protected function getContentTypeServiceMock() { $contentTypeServiceMock = $this->getMock('eZ\\Publish\\Core\\Repository\\ContentTypeService', array(), array(), '', false); $contentTypeServiceMock->expects($this->any())->method('newContentTypeGroupCreateStruct')->with($this->equalTo('Identifier Bar'))->will($this->returnValue(new ContentTypeGroupCreateStruct(array('identifier' => 'Identifier Bar')))); return $contentTypeServiceMock; }