eZ\Publish\Core\MVC\Symfony\Templating\Tests\Twig\Extension\ContentExtensionTest::getContentTypeServiceMock PHP 메소드

getContentTypeServiceMock() 보호된 메소드

protected getContentTypeServiceMock ( ) : PHPUnit_Framework_MockObject_MockObject
리턴 PHPUnit_Framework_MockObject_MockObject
    protected function getContentTypeServiceMock()
    {
        $mock = $this->getMock('eZ\\Publish\\API\\Repository\\ContentTypeService');
        $mock->expects($this->any())->method('loadContentType')->will($this->returnCallback(function ($contentTypeId) {
            return new ContentType(array('identifier' => $contentTypeId, 'mainLanguageCode' => 'fre-FR', 'fieldDefinitions' => $this->fieldDefinitions[$contentTypeId]));
        }));
        return $mock;
    }