| @@ 1336-1356 (lines=21) @@ | ||
| 1333 | * |
|
| 1334 | * @covers \eZ\Publish\Core\Repository\ContentService::newContentUpdateStruct |
|
| 1335 | */ |
|
| 1336 | public function testNewContentUpdateStruct() |
|
| 1337 | { |
|
| 1338 | /* BEGIN: Use Case */ |
|
| 1339 | $contentService = $this->repository->getContentService(); |
|
| 1340 | ||
| 1341 | $contentUpdateStruct = $contentService->newContentUpdateStruct(); |
|
| 1342 | /* END: Use Case */ |
|
| 1343 | ||
| 1344 | $this->assertInstanceOf( |
|
| 1345 | 'eZ\\Publish\\API\\Repository\\Values\\Content\\ContentUpdateStruct', |
|
| 1346 | $contentUpdateStruct |
|
| 1347 | ); |
|
| 1348 | ||
| 1349 | $this->assertPropertiesCorrect( |
|
| 1350 | array( |
|
| 1351 | 'initialLanguageCode' => null, |
|
| 1352 | 'fields' => array(), |
|
| 1353 | ), |
|
| 1354 | $contentUpdateStruct |
|
| 1355 | ); |
|
| 1356 | } |
|
| 1357 | ||
| 1358 | /** |
|
| 1359 | * Test for the updateContent() method. |
|
| @@ 888-906 (lines=19) @@ | ||
| 885 | * |
|
| 886 | * @covers \eZ\Publish\API\Repository\RoleService::newRoleUpdateStruct |
|
| 887 | */ |
|
| 888 | public function testNewRoleUpdateStruct() |
|
| 889 | { |
|
| 890 | $roleService = $this->repository->getRoleService(); |
|
| 891 | ||
| 892 | $roleUpdateStruct = $roleService->newRoleUpdateStruct(); |
|
| 893 | ||
| 894 | self::assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\User\\RoleUpdateStruct', $roleUpdateStruct); |
|
| 895 | ||
| 896 | $this->assertPropertiesCorrect( |
|
| 897 | array( |
|
| 898 | 'identifier' => null, |
|
| 899 | // @todo uncomment when support for multilingual names and descriptions is added EZP-24776 |
|
| 900 | // 'mainLanguageCode' => null, |
|
| 901 | // 'names' => null, |
|
| 902 | // 'descriptions' => null |
|
| 903 | ), |
|
| 904 | $roleUpdateStruct |
|
| 905 | ); |
|
| 906 | } |
|
| 907 | ||
| 908 | /** |
|
| 909 | * Test creating new PolicyUpdateStruct. |
|
| @@ 377-392 (lines=16) @@ | ||
| 374 | * |
|
| 375 | * @covers \eZ\Publish\Core\Repository\SectionService::newSectionCreateStruct |
|
| 376 | */ |
|
| 377 | public function testNewSectionCreateStruct() |
|
| 378 | { |
|
| 379 | $sectionService = $this->repository->getSectionService(); |
|
| 380 | ||
| 381 | $sectionCreateStruct = $sectionService->newSectionCreateStruct(); |
|
| 382 | ||
| 383 | self::assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\Content\\SectionCreateStruct', $sectionCreateStruct); |
|
| 384 | ||
| 385 | $this->assertPropertiesCorrect( |
|
| 386 | array( |
|
| 387 | 'identifier' => null, |
|
| 388 | 'name' => null, |
|
| 389 | ), |
|
| 390 | $sectionCreateStruct |
|
| 391 | ); |
|
| 392 | } |
|
| 393 | ||
| 394 | /** |
|
| 395 | * Test service function for creating new SectionUpdateStruct. |
|
| @@ 399-414 (lines=16) @@ | ||
| 396 | * |
|
| 397 | * @covers \eZ\Publish\Core\Repository\SectionService::newSectionUpdateStruct |
|
| 398 | */ |
|
| 399 | public function testNewSectionUpdateStruct() |
|
| 400 | { |
|
| 401 | $sectionService = $this->repository->getSectionService(); |
|
| 402 | ||
| 403 | $sectionUpdateStruct = $sectionService->newSectionUpdateStruct(); |
|
| 404 | ||
| 405 | self::assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\Content\\SectionUpdateStruct', $sectionUpdateStruct); |
|
| 406 | ||
| 407 | $this->assertPropertiesCorrect( |
|
| 408 | array( |
|
| 409 | 'identifier' => null, |
|
| 410 | 'name' => null, |
|
| 411 | ), |
|
| 412 | $sectionUpdateStruct |
|
| 413 | ); |
|
| 414 | } |
|
| 415 | } |
|
| 416 | ||