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

testParse() public method

Tests the RoleInput parser.
public testParse ( )
    public function testParse()
    {
        $inputArray = array('identifier' => 'Identifier Bar');
        $roleInput = $this->getParser();
        $result = $roleInput->parse($inputArray, $this->getParsingDispatcherMock());
        $this->assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\User\\RoleCreateStruct', $result, 'RoleCreateStruct not created correctly.');
        $this->assertEquals('Identifier Bar', $result->identifier, 'RoleCreateStruct identifier property not created correctly.');
        /* @todo uncomment when support for multilingual names and descriptions is added EZP-24776
                $this->assertEquals(
                    array( 'eng-GB' => 'Test role' ),
                    $result->names,
                    'RoleCreateStruct names property not created correctly.'
                );
        
                $this->assertEquals(
                    array( 'eng-GB' => 'Test role description' ),
                    $result->descriptions,
                    'RoleCreateStruct descriptions property not created correctly.'
                );
                */
    }