|
@@ 93-102 (lines=10) @@
|
| 90 |
|
]); |
| 91 |
|
} |
| 92 |
|
|
| 93 |
|
public function testGetStateByStatus() |
| 94 |
|
{ |
| 95 |
|
$expected = 'complete'; |
| 96 |
|
|
| 97 |
|
$this->databaseResource->method('getTableName')->willReturn('sales_order_status_state'); |
| 98 |
|
$this->connection->method('fetchOne')->willReturn($expected); |
| 99 |
|
|
| 100 |
|
$result = $this->database->getStateByStatus($expected); |
| 101 |
|
$this->assertEquals($expected, $result); |
| 102 |
|
} |
| 103 |
|
|
| 104 |
|
public function testGetOrderIncrementIdByTxid() |
| 105 |
|
{ |
|
@@ 104-113 (lines=10) @@
|
| 101 |
|
$this->assertEquals($expected, $result); |
| 102 |
|
} |
| 103 |
|
|
| 104 |
|
public function testGetOrderIncrementIdByTxid() |
| 105 |
|
{ |
| 106 |
|
$expected = '000000123'; |
| 107 |
|
|
| 108 |
|
$this->databaseResource->method('getTableName')->willReturn('payone_protocol_api'); |
| 109 |
|
$this->connection->method('fetchOne')->willReturn($expected); |
| 110 |
|
|
| 111 |
|
$result = $this->database->getOrderIncrementIdByTxid('200001234'); |
| 112 |
|
$this->assertEquals($expected, $result); |
| 113 |
|
} |
| 114 |
|
|
| 115 |
|
public function testGetModuleInfo() |
| 116 |
|
{ |
|
@@ 129-138 (lines=10) @@
|
| 126 |
|
$this->assertEquals($expected, $result); |
| 127 |
|
} |
| 128 |
|
|
| 129 |
|
public function testGetIncrementIdByOrderId() |
| 130 |
|
{ |
| 131 |
|
$expected = '000000001'; |
| 132 |
|
|
| 133 |
|
$this->databaseResource->method('getTableName')->willReturn('sales_order'); |
| 134 |
|
$this->connection->method('fetchOne')->willReturn($expected); |
| 135 |
|
|
| 136 |
|
$result = $this->database->getIncrementIdByOrderId('1'); |
| 137 |
|
$this->assertEquals($expected, $result); |
| 138 |
|
} |
| 139 |
|
|
| 140 |
|
public function testGetPayoneUserIdByCustNr() |
| 141 |
|
{ |
|
@@ 140-149 (lines=10) @@
|
| 137 |
|
$this->assertEquals($expected, $result); |
| 138 |
|
} |
| 139 |
|
|
| 140 |
|
public function testGetPayoneUserIdByCustNr() |
| 141 |
|
{ |
| 142 |
|
$expected = '15'; |
| 143 |
|
|
| 144 |
|
$this->databaseResource->method('getTableName')->willReturn('payone_protocol_transactionstatus'); |
| 145 |
|
$this->connection->method('fetchOne')->willReturn($expected); |
| 146 |
|
|
| 147 |
|
$result = $this->database->getPayoneUserIdByCustNr('803'); |
| 148 |
|
$this->assertEquals($expected, $result); |
| 149 |
|
} |
| 150 |
|
|
| 151 |
|
public function testGetSequenceNumber() |
| 152 |
|
{ |
|
@@ 151-160 (lines=10) @@
|
| 148 |
|
$this->assertEquals($expected, $result); |
| 149 |
|
} |
| 150 |
|
|
| 151 |
|
public function testGetSequenceNumber() |
| 152 |
|
{ |
| 153 |
|
$expected = 38; |
| 154 |
|
|
| 155 |
|
$this->databaseResource->method('getTableName')->willReturn('payone_protocol_transactionstatus'); |
| 156 |
|
$this->connection->method('fetchOne')->willReturn($expected - 1); |
| 157 |
|
|
| 158 |
|
$result = $this->database->getSequenceNumber('1207'); |
| 159 |
|
$this->assertEquals($expected, $result); |
| 160 |
|
} |
| 161 |
|
|
| 162 |
|
public function testGetSequenceNumberNull() |
| 163 |
|
{ |
|
@@ 162-171 (lines=10) @@
|
| 159 |
|
$this->assertEquals($expected, $result); |
| 160 |
|
} |
| 161 |
|
|
| 162 |
|
public function testGetSequenceNumberNull() |
| 163 |
|
{ |
| 164 |
|
$expected = 0; |
| 165 |
|
|
| 166 |
|
$this->databaseResource->method('getTableName')->willReturn('payone_protocol_transactionstatus'); |
| 167 |
|
$this->connection->method('fetchOne')->willReturn(null); |
| 168 |
|
|
| 169 |
|
$result = $this->database->getSequenceNumber('1207'); |
| 170 |
|
$this->assertEquals($expected, $result); |
| 171 |
|
} |
| 172 |
|
|
| 173 |
|
public function testGetConfigParamWithoutCache() |
| 174 |
|
{ |
|
@@ 173-182 (lines=10) @@
|
| 170 |
|
$this->assertEquals($expected, $result); |
| 171 |
|
} |
| 172 |
|
|
| 173 |
|
public function testGetConfigParamWithoutCache() |
| 174 |
|
{ |
| 175 |
|
$expected = '17123'; |
| 176 |
|
|
| 177 |
|
$this->databaseResource->method('getTableName')->willReturn('payone_protocol_transactionstatus'); |
| 178 |
|
$this->connection->method('fetchOne')->willReturn($expected); |
| 179 |
|
|
| 180 |
|
$result = $this->database->getConfigParamWithoutCache('mid'); |
| 181 |
|
$this->assertEquals($expected, $result); |
| 182 |
|
} |
| 183 |
|
|
| 184 |
|
public function testGetOldAddressStatus() |
| 185 |
|
{ |