|
@@ -277,7 +277,7 @@ class DolibarrSyncServiceTest extends TestCase
|
|
|
'zip : `74300` => `250 329`',
|
|
'zip : `74300` => `250 329`',
|
|
|
'town : `CLUSES` => `Londres`',
|
|
'town : `CLUSES` => `Londres`',
|
|
|
'email : `` => `email@email.com`',
|
|
'email : `` => `email@email.com`',
|
|
|
- 'phone : `+33678403010` => `+33 1 02 03 04 05`',
|
|
|
|
|
|
|
+ 'phone : `+33678403010` => `+33102030405`',
|
|
|
'parent : `` => `5086`',
|
|
'parent : `` => `5086`',
|
|
|
"array_options.options_2iopeninfoopentalent : `` => `Nombre d'élèves : 1\nNombre d'adhérents : 3\nNombre d'accès admin : 1`"
|
|
"array_options.options_2iopeninfoopentalent : `` => `Nombre d'élèves : 1\nNombre d'adhérents : 3\nNombre d'accès admin : 1`"
|
|
|
],
|
|
],
|
|
@@ -467,7 +467,7 @@ class DolibarrSyncServiceTest extends TestCase
|
|
|
$syncService = $this->newDolibarrSyncService();
|
|
$syncService = $this->newDolibarrSyncService();
|
|
|
|
|
|
|
|
$this->assertEquals(
|
|
$this->assertEquals(
|
|
|
- '+33 1 61 62 63 65',
|
|
|
|
|
|
|
+ '+33161626365',
|
|
|
$syncService->getOrganizationPhone($organization)
|
|
$syncService->getOrganizationPhone($organization)
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
@@ -499,7 +499,7 @@ class DolibarrSyncServiceTest extends TestCase
|
|
|
$syncService = $this->newDolibarrSyncService();
|
|
$syncService = $this->newDolibarrSyncService();
|
|
|
|
|
|
|
|
$this->assertEquals(
|
|
$this->assertEquals(
|
|
|
- '+33 6 61 62 63 65',
|
|
|
|
|
|
|
+ '+33661626365',
|
|
|
$syncService->getOrganizationPhone($organization)
|
|
$syncService->getOrganizationPhone($organization)
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
@@ -668,14 +668,14 @@ class DolibarrSyncServiceTest extends TestCase
|
|
|
$phoneUtil = PhoneNumberUtil::getInstance();
|
|
$phoneUtil = PhoneNumberUtil::getInstance();
|
|
|
$phoneNumber = $phoneUtil->parse('01 02 03 04 05', "FR");
|
|
$phoneNumber = $phoneUtil->parse('01 02 03 04 05', "FR");
|
|
|
$this->assertEquals(
|
|
$this->assertEquals(
|
|
|
- '+33 1 02 03 04 05',
|
|
|
|
|
|
|
+ '+33102030405',
|
|
|
TestableDolibarrSyncService::formatPhoneNumber($phoneNumber)
|
|
TestableDolibarrSyncService::formatPhoneNumber($phoneNumber)
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function testFilterDiff() {
|
|
public function testFilterDiff() {
|
|
|
$this->assertEquals(
|
|
$this->assertEquals(
|
|
|
- ['b' => -2, 'c' => ['e' => ['f' => -5]], 'g' => 7],
|
|
|
|
|
|
|
+ ['b' => -2, 'c' => ['d' => 4, 'e' => ['f' => -5]], 'g' => 7],
|
|
|
TestableDolibarrSyncService::filterDiff(
|
|
TestableDolibarrSyncService::filterDiff(
|
|
|
['a' => 1, 'b' => 2, 'c' => ['d' => 4, 'e' => ['f' => 5]]],
|
|
['a' => 1, 'b' => 2, 'c' => ['d' => 4, 'e' => ['f' => 5]]],
|
|
|
['a' => 1, 'b' => -2, 'c' => ['d' => 4, 'e' => ['f' => -5]], 'g' => 7],
|
|
['a' => 1, 'b' => -2, 'c' => ['d' => 4, 'e' => ['f' => -5]], 'g' => 7],
|