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

testParse() public method

Tests the ObjectStateGroupCreate 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'))));
        $objectStateGroupCreate = $this->getParser();
        $result = $objectStateGroupCreate->parse($inputArray, $this->getParsingDispatcherMock());
        $this->assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\ObjectState\\ObjectStateGroupCreateStruct', $result, 'ObjectStateGroupCreateStruct not created correctly.');
        $this->assertEquals('test-group', $result->identifier, 'ObjectStateGroupCreateStruct identifier property not created correctly.');
        $this->assertEquals('eng-GB', $result->defaultLanguageCode, 'ObjectStateGroupCreateStruct defaultLanguageCode property not created correctly.');
        $this->assertEquals(array('eng-GB' => 'Test group'), $result->names, 'ObjectStateGroupCreateStruct names property not created correctly.');
        $this->assertEquals(array('eng-GB' => 'Test group description'), $result->descriptions, 'ObjectStateGroupCreateStruct descriptions property not created correctly.');
    }