@@ 29-52 (lines=24) @@ | ||
26 | * |
|
27 | * @covers \eZ\Publish\API\Repository\LanguageService::newLanguageCreateStruct |
|
28 | */ |
|
29 | public function testNewLanguageCreateStruct() |
|
30 | { |
|
31 | $repository = $this->getRepository(); |
|
32 | ||
33 | /* BEGIN: Use Case */ |
|
34 | $languageService = $repository->getContentLanguageService(); |
|
35 | ||
36 | $languageCreate = $languageService->newLanguageCreateStruct(); |
|
37 | /* END: Use Case */ |
|
38 | ||
39 | $this->assertInstanceOf( |
|
40 | LanguageCreateStruct::class, |
|
41 | $languageCreate |
|
42 | ); |
|
43 | ||
44 | $this->assertPropertiesCorrect( |
|
45 | [ |
|
46 | 'languageCode' => null, |
|
47 | 'name' => null, |
|
48 | 'enabled' => true, |
|
49 | ], |
|
50 | $languageCreate |
|
51 | ); |
|
52 | } |
|
53 | ||
54 | /** |
|
55 | * Test for the createLanguage() method. |
@@ 1246-1270 (lines=25) @@ | ||
1243 | * |
|
1244 | * @covers \eZ\Publish\API\Repository\LocationService::newLocationUpdateStruct |
|
1245 | */ |
|
1246 | public function testNewLocationUpdateStruct() |
|
1247 | { |
|
1248 | $repository = $this->getRepository(); |
|
1249 | ||
1250 | /* BEGIN: Use Case */ |
|
1251 | $locationService = $repository->getLocationService(); |
|
1252 | ||
1253 | $updateStruct = $locationService->newLocationUpdateStruct(); |
|
1254 | /* END: Use Case */ |
|
1255 | ||
1256 | $this->assertInstanceOf( |
|
1257 | LocationUpdateStruct::class, |
|
1258 | $updateStruct |
|
1259 | ); |
|
1260 | ||
1261 | $this->assertPropertiesCorrect( |
|
1262 | [ |
|
1263 | 'priority' => null, |
|
1264 | 'remoteId' => null, |
|
1265 | 'sortField' => null, |
|
1266 | 'sortOrder' => null, |
|
1267 | ], |
|
1268 | $updateStruct |
|
1269 | ); |
|
1270 | } |
|
1271 | ||
1272 | /** |
|
1273 | * Test for the updateLocation() method. |