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