| @@ 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. |
|
| @@ 965-989 (lines=25) @@ | ||
| 962 | * |
|
| 963 | * @covers \eZ\Publish\API\Repository\LocationService::newLocationUpdateStruct |
|
| 964 | */ |
|
| 965 | public function testNewLocationUpdateStruct() |
|
| 966 | { |
|
| 967 | $repository = $this->getRepository(); |
|
| 968 | ||
| 969 | /* BEGIN: Use Case */ |
|
| 970 | $locationService = $repository->getLocationService(); |
|
| 971 | ||
| 972 | $updateStruct = $locationService->newLocationUpdateStruct(); |
|
| 973 | /* END: Use Case */ |
|
| 974 | ||
| 975 | $this->assertInstanceOf( |
|
| 976 | LocationUpdateStruct::class, |
|
| 977 | $updateStruct |
|
| 978 | ); |
|
| 979 | ||
| 980 | $this->assertPropertiesCorrect( |
|
| 981 | [ |
|
| 982 | 'priority' => null, |
|
| 983 | 'remoteId' => null, |
|
| 984 | 'sortField' => null, |
|
| 985 | 'sortOrder' => null, |
|
| 986 | ], |
|
| 987 | $updateStruct |
|
| 988 | ); |
|
| 989 | } |
|
| 990 | ||
| 991 | /** |
|
| 992 | * Test for the updateLocation() method. |
|