| @@ 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. |
|
| @@ 1134-1158 (lines=25) @@ | ||
| 1131 | * |
|
| 1132 | * @covers \eZ\Publish\API\Repository\LocationService::newLocationUpdateStruct |
|
| 1133 | */ |
|
| 1134 | public function testNewLocationUpdateStruct() |
|
| 1135 | { |
|
| 1136 | $repository = $this->getRepository(); |
|
| 1137 | ||
| 1138 | /* BEGIN: Use Case */ |
|
| 1139 | $locationService = $repository->getLocationService(); |
|
| 1140 | ||
| 1141 | $updateStruct = $locationService->newLocationUpdateStruct(); |
|
| 1142 | /* END: Use Case */ |
|
| 1143 | ||
| 1144 | $this->assertInstanceOf( |
|
| 1145 | LocationUpdateStruct::class, |
|
| 1146 | $updateStruct |
|
| 1147 | ); |
|
| 1148 | ||
| 1149 | $this->assertPropertiesCorrect( |
|
| 1150 | [ |
|
| 1151 | 'priority' => null, |
|
| 1152 | 'remoteId' => null, |
|
| 1153 | 'sortField' => null, |
|
| 1154 | 'sortOrder' => null, |
|
| 1155 | ], |
|
| 1156 | $updateStruct |
|
| 1157 | ); |
|
| 1158 | } |
|
| 1159 | ||
| 1160 | /** |
|
| 1161 | * Test for the updateLocation() method. |
|