| @@ 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. |
|
| @@ 1175-1199 (lines=25) @@ | ||
| 1172 | * |
|
| 1173 | * @covers \eZ\Publish\API\Repository\LocationService::newLocationUpdateStruct |
|
| 1174 | */ |
|
| 1175 | public function testNewLocationUpdateStruct() |
|
| 1176 | { |
|
| 1177 | $repository = $this->getRepository(); |
|
| 1178 | ||
| 1179 | /* BEGIN: Use Case */ |
|
| 1180 | $locationService = $repository->getLocationService(); |
|
| 1181 | ||
| 1182 | $updateStruct = $locationService->newLocationUpdateStruct(); |
|
| 1183 | /* END: Use Case */ |
|
| 1184 | ||
| 1185 | $this->assertInstanceOf( |
|
| 1186 | LocationUpdateStruct::class, |
|
| 1187 | $updateStruct |
|
| 1188 | ); |
|
| 1189 | ||
| 1190 | $this->assertPropertiesCorrect( |
|
| 1191 | [ |
|
| 1192 | 'priority' => null, |
|
| 1193 | 'remoteId' => null, |
|
| 1194 | 'sortField' => null, |
|
| 1195 | 'sortOrder' => null, |
|
| 1196 | ], |
|
| 1197 | $updateStruct |
|
| 1198 | ); |
|
| 1199 | } |
|
| 1200 | ||
| 1201 | /** |
|
| 1202 | * Test for the updateLocation() method. |
|