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