mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-04-11 12:50:55 +00:00
Fix the mistake with test name
This commit is contained in:
parent
0ab8dadd15
commit
233f78e221
1 changed files with 12 additions and 4 deletions
|
@ -196,7 +196,7 @@ class RetailcrmHistoryTest extends RetailcrmTestCase
|
|||
$this->assertEquals($updReference, $secondUpdOrder->reference);
|
||||
}
|
||||
|
||||
public function tetsLastSinceId()
|
||||
public function testLastSinceId()
|
||||
{
|
||||
RetailcrmHistory::$default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
|
||||
RetailcrmHistory::$api = $this->apiMock;
|
||||
|
@ -206,13 +206,21 @@ class RetailcrmHistoryTest extends RetailcrmTestCase
|
|||
->willReturn(new RetailcrmApiResponse('200', json_encode($this->getLastSinceId())))
|
||||
;
|
||||
|
||||
$this->apiClientMock->expects($this->any())
|
||||
->method('customersHistory')
|
||||
->willReturn(new RetailcrmApiResponse('200', json_encode($this->getLastSinceId())))
|
||||
;
|
||||
|
||||
$lastSinceId = 0;
|
||||
|
||||
Configuration::updateValue('RETAILCRM_LAST_ORDERS_SYNC', $lastSinceId);
|
||||
Configuration::updateValue('RETAILCRM_LAST_CUSTOMERS_SYNC', $lastSinceId);
|
||||
|
||||
$isUpdate = RetailcrmHistory::updateSinceId('orders');
|
||||
|
||||
$this->assertTrue($isUpdate);
|
||||
$this->assertTrue(RetailcrmHistory::updateSinceId('orders'));
|
||||
$this->assertTrue(RetailcrmHistory::updateSinceId('customers'));
|
||||
$this->assertNotEquals($lastSinceId, Configuration::get('RETAILCRM_LAST_ORDERS_SYNC'));
|
||||
$this->assertNotEquals($lastSinceId, Configuration::get('RETAILCRM_LAST_CUSTOMERS_SYNC'));
|
||||
$this->assertFalse(RetailcrmHistory::updateSinceId('test_test'));
|
||||
}
|
||||
|
||||
public function orderCreateDataProvider()
|
||||
|
|
Loading…
Add table
Reference in a new issue