| @@ 30-53 (lines=24) @@ | ||
| 27 | * |
|
| 28 | * @covers \eZ\Publish\API\Repository\LanguageService::newLanguageCreateStruct |
|
| 29 | */ |
|
| 30 | public function testNewLanguageCreateStruct() |
|
| 31 | { |
|
| 32 | $repository = $this->getRepository(); |
|
| 33 | ||
| 34 | /* BEGIN: Use Case */ |
|
| 35 | $languageService = $repository->getContentLanguageService(); |
|
| 36 | ||
| 37 | $languageCreate = $languageService->newLanguageCreateStruct(); |
|
| 38 | /* END: Use Case */ |
|
| 39 | ||
| 40 | $this->assertInstanceOf( |
|
| 41 | LanguageCreateStruct::class, |
|
| 42 | $languageCreate |
|
| 43 | ); |
|
| 44 | ||
| 45 | $this->assertPropertiesCorrect( |
|
| 46 | [ |
|
| 47 | 'languageCode' => null, |
|
| 48 | 'name' => null, |
|
| 49 | 'enabled' => true, |
|
| 50 | ], |
|
| 51 | $languageCreate |
|
| 52 | ); |
|
| 53 | } |
|
| 54 | ||
| 55 | /** |
|
| 56 | * Test for the createLanguage() method. |
|
| @@ 1008-1032 (lines=25) @@ | ||
| 1005 | * |
|
| 1006 | * @covers \eZ\Publish\API\Repository\LocationService::newLocationUpdateStruct |
|
| 1007 | */ |
|
| 1008 | public function testNewLocationUpdateStruct() |
|
| 1009 | { |
|
| 1010 | $repository = $this->getRepository(); |
|
| 1011 | ||
| 1012 | /* BEGIN: Use Case */ |
|
| 1013 | $locationService = $repository->getLocationService(); |
|
| 1014 | ||
| 1015 | $updateStruct = $locationService->newLocationUpdateStruct(); |
|
| 1016 | /* END: Use Case */ |
|
| 1017 | ||
| 1018 | $this->assertInstanceOf( |
|
| 1019 | LocationUpdateStruct::class, |
|
| 1020 | $updateStruct |
|
| 1021 | ); |
|
| 1022 | ||
| 1023 | $this->assertPropertiesCorrect( |
|
| 1024 | [ |
|
| 1025 | 'priority' => null, |
|
| 1026 | 'remoteId' => null, |
|
| 1027 | 'sortField' => null, |
|
| 1028 | 'sortOrder' => null, |
|
| 1029 | ], |
|
| 1030 | $updateStruct |
|
| 1031 | ); |
|
| 1032 | } |
|
| 1033 | ||
| 1034 | /** |
|
| 1035 | * Test for the updateLocation() method. |
|