eZ\Publish\Core\Repository\Tests\Service\Integration\ObjectStateBase::testUpdateObjectStateGroup PHP Method

testUpdateObjectStateGroup() public method

Test service method for updating object state group.
    public function testUpdateObjectStateGroup()
    {
        $objectStateService = $this->repository->getObjectStateService();
        $groupUpdateStruct = $objectStateService->newObjectStateGroupUpdateStruct();
        $groupUpdateStruct->identifier = 'test';
        $groupUpdateStruct->defaultLanguageCode = 'eng-GB';
        $groupUpdateStruct->names = array('eng-GB' => 'Test');
        $groupUpdateStruct->descriptions = array('eng-GB' => 'Test description');
        $group = $objectStateService->loadObjectStateGroup(2);
        $updatedGroup = $objectStateService->updateObjectStateGroup($group, $groupUpdateStruct);
        $this->assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\ObjectState\\ObjectStateGroup', $updatedGroup);
        $this->assertPropertiesCorrect(array('id' => 2, 'identifier' => 'test', 'defaultLanguageCode' => 'eng-GB', 'languageCodes' => array('eng-GB'), 'names' => array('eng-GB' => 'Test'), 'descriptions' => array('eng-GB' => 'Test description')), $updatedGroup);
    }