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