| @@ 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. |
|
| @@ 1154-1178 (lines=25) @@ | ||
| 1151 | * |
|
| 1152 | * @covers \eZ\Publish\API\Repository\LocationService::newLocationUpdateStruct |
|
| 1153 | */ |
|
| 1154 | public function testNewLocationUpdateStruct() |
|
| 1155 | { |
|
| 1156 | $repository = $this->getRepository(); |
|
| 1157 | ||
| 1158 | /* BEGIN: Use Case */ |
|
| 1159 | $locationService = $repository->getLocationService(); |
|
| 1160 | ||
| 1161 | $updateStruct = $locationService->newLocationUpdateStruct(); |
|
| 1162 | /* END: Use Case */ |
|
| 1163 | ||
| 1164 | $this->assertInstanceOf( |
|
| 1165 | LocationUpdateStruct::class, |
|
| 1166 | $updateStruct |
|
| 1167 | ); |
|
| 1168 | ||
| 1169 | $this->assertPropertiesCorrect( |
|
| 1170 | [ |
|
| 1171 | 'priority' => null, |
|
| 1172 | 'remoteId' => null, |
|
| 1173 | 'sortField' => null, |
|
| 1174 | 'sortOrder' => null, |
|
| 1175 | ], |
|
| 1176 | $updateStruct |
|
| 1177 | ); |
|
| 1178 | } |
|
| 1179 | ||
| 1180 | /** |
|
| 1181 | * Test for the updateLocation() method. |
|