eZ\Publish\Core\Repository\Tests\Service\Mock\NameSchemaTest::testResolveNameSchema PHP Method

testResolveNameSchema() public method

Test eZ\Publish\Core\Repository\Helper\NameSchemaService method.
    public function testResolveNameSchema()
    {
        $serviceMock = $this->getPartlyMockedNameSchemaService(array('resolve'));
        list($content, $contentType) = $this->buildTestObjects();
        $serviceMock->expects($this->once())->method('resolve')->with('<name_schema>', $this->equalTo($contentType), $this->equalTo($content->fields), $this->equalTo($content->versionInfo->languageCodes))->will($this->returnValue(42));
        $result = $serviceMock->resolveNameSchema($content, array(), array(), $contentType);
        self::assertEquals(42, $result);
    }