| @@ 28-51 (lines=24) @@ | ||
| 25 | * |
|
| 26 | * @covers \eZ\Publish\API\Repository\LanguageService::newLanguageCreateStruct |
|
| 27 | */ |
|
| 28 | public function testNewLanguageCreateStruct() |
|
| 29 | { |
|
| 30 | $repository = $this->getRepository(); |
|
| 31 | ||
| 32 | /* BEGIN: Use Case */ |
|
| 33 | $languageService = $repository->getContentLanguageService(); |
|
| 34 | ||
| 35 | $languageCreate = $languageService->newLanguageCreateStruct(); |
|
| 36 | /* END: Use Case */ |
|
| 37 | ||
| 38 | $this->assertInstanceOf( |
|
| 39 | LanguageCreateStruct::class, |
|
| 40 | $languageCreate |
|
| 41 | ); |
|
| 42 | ||
| 43 | $this->assertPropertiesCorrect( |
|
| 44 | [ |
|
| 45 | 'languageCode' => null, |
|
| 46 | 'name' => null, |
|
| 47 | 'enabled' => true, |
|
| 48 | ], |
|
| 49 | $languageCreate |
|
| 50 | ); |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Test for the createLanguage() method. |
|
| @@ 1273-1297 (lines=25) @@ | ||
| 1270 | * |
|
| 1271 | * @covers \eZ\Publish\API\Repository\LocationService::newLocationUpdateStruct |
|
| 1272 | */ |
|
| 1273 | public function testNewLocationUpdateStruct() |
|
| 1274 | { |
|
| 1275 | $repository = $this->getRepository(); |
|
| 1276 | ||
| 1277 | /* BEGIN: Use Case */ |
|
| 1278 | $locationService = $repository->getLocationService(); |
|
| 1279 | ||
| 1280 | $updateStruct = $locationService->newLocationUpdateStruct(); |
|
| 1281 | /* END: Use Case */ |
|
| 1282 | ||
| 1283 | $this->assertInstanceOf( |
|
| 1284 | LocationUpdateStruct::class, |
|
| 1285 | $updateStruct |
|
| 1286 | ); |
|
| 1287 | ||
| 1288 | $this->assertPropertiesCorrect( |
|
| 1289 | [ |
|
| 1290 | 'priority' => null, |
|
| 1291 | 'remoteId' => null, |
|
| 1292 | 'sortField' => null, |
|
| 1293 | 'sortOrder' => null, |
|
| 1294 | ], |
|
| 1295 | $updateStruct |
|
| 1296 | ); |
|
| 1297 | } |
|
| 1298 | ||
| 1299 | /** |
|
| 1300 | * Test for the updateLocation() method. |
|