eZ\Publish\Core\REST\Server\Tests\Input\Parser\ObjectStateGroupUpdateTest::testParse PHP Method

testParse() public method

Tests the ObjectStateGroupUpdate parser.
public testParse ( )
    public function testParse()
    {
        $inputArray = array('identifier' => 'test-group', 'defaultLanguageCode' => 'eng-GB', 'names' => array('value' => array(array('_languageCode' => 'eng-GB', '#text' => 'Test group'))), 'descriptions' => array('value' => array(array('_languageCode' => 'eng-GB', '#text' => 'Test group description'))));
        $objectStateGroupUpdate = $this->getParser();
        $result = $objectStateGroupUpdate->parse($inputArray, $this->getParsingDispatcherMock());
        $this->assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\ObjectState\\ObjectStateGroupUpdateStruct', $result, 'ObjectStateGroupUpdateStruct not created correctly.');
        $this->assertEquals('test-group', $result->identifier, 'ObjectStateGroupUpdateStruct identifier property not created correctly.');
        $this->assertEquals('eng-GB', $result->defaultLanguageCode, 'ObjectStateGroupUpdateStruct defaultLanguageCode property not created correctly.');
        $this->assertEquals(array('eng-GB' => 'Test group'), $result->names, 'ObjectStateGroupUpdateStruct names property not created correctly.');
        $this->assertEquals(array('eng-GB' => 'Test group description'), $result->descriptions, 'ObjectStateGroupUpdateStruct descriptions property not created correctly.');
    }