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; }