|
|
@@ -46,7 +46,6 @@ class TestableDolibarrSyncService extends DolibarrSyncService {
|
|
|
public function getPersonContact(Person $person): ?ContactPoint { return parent::getPersonContact($person); }
|
|
|
public function formatContactPosition(array $missions, ?string $gender = 'X'): string { return parent::formatContactPosition($missions, $gender); }
|
|
|
public static function formatPhoneNumber(PhoneNumber $phoneNumber): string { return parent::formatPhoneNumber($phoneNumber); }
|
|
|
- public static function getChanges(array $initialData, array $newData): array { return parent::getChanges($initialData, $newData); }
|
|
|
}
|
|
|
|
|
|
class DolibarrSyncServiceTest extends TestCase
|
|
|
@@ -98,7 +97,7 @@ class DolibarrSyncServiceTest extends TestCase
|
|
|
}
|
|
|
|
|
|
private function getJsonContentFromFixture(string $filename): array {
|
|
|
- $filepath = dirname(__FILE__) . '/fixtures/' . $filename;
|
|
|
+ $filepath = __DIR__ . '/fixtures/' . $filename;
|
|
|
return json_decode(file_get_contents($filepath), true);
|
|
|
}
|
|
|
|
|
|
@@ -262,6 +261,7 @@ class DolibarrSyncServiceTest extends TestCase
|
|
|
['STUDENTS_COUNT', [], null, null, "Nombre d'élèves"],
|
|
|
['ADHERENTS_COUNT', [], null, null, "Nombre d'adhérents"],
|
|
|
['ADMIN_ACCESS_COUNT', [], null, null, "Nombre d'accès admin"],
|
|
|
+ ['school', [], null, null, "Opentalent School"],
|
|
|
]
|
|
|
);
|
|
|
|
|
|
@@ -270,7 +270,6 @@ class DolibarrSyncServiceTest extends TestCase
|
|
|
$operations = $syncService->scan();
|
|
|
|
|
|
$this->assertCount(4, $operations);
|
|
|
-
|
|
|
$this->assertEquals(
|
|
|
[
|
|
|
'[PUT thirdparties/1726]',
|
|
|
@@ -280,7 +279,9 @@ class DolibarrSyncServiceTest extends TestCase
|
|
|
'email : `` => `email@email.com`',
|
|
|
'phone : `+33678403010` => `+33102030405`',
|
|
|
'parent : `` => `711`',
|
|
|
+ "array_options.options_2iopen_software_opentalent : `` => `Opentalent School`",
|
|
|
"array_options.options_2iopeninfoopentalent : `` => `Nombre d'élèves : 1\nNombre d'adhérents : 3\nNombre d'accès admin : 1`"
|
|
|
+
|
|
|
],
|
|
|
$operations[0]->getChangeLog()
|
|
|
);
|