eZ\Publish\Core\REST\Server\Tests\Input\Parser\ContentTypeCreateTest::getContentTypeServiceMock PHP Method

getContentTypeServiceMock() protected method

Get the content type service mock object.
protected getContentTypeServiceMock ( ) : eZ\Publish\API\Repository\ContentTypeService
return eZ\Publish\API\Repository\ContentTypeService
    protected function getContentTypeServiceMock()
    {
        $contentTypeServiceMock = $this->getMock('eZ\\Publish\\Core\\Repository\\ContentTypeService', array(), array(), '', false);
        $contentTypeServiceMock->expects($this->any())->method('newContentTypeCreateStruct')->with($this->equalTo('new_content_type'))->will($this->returnValue(new ContentTypeCreateStruct(array('identifier' => 'new_content_type'))));
        return $contentTypeServiceMock;
    }