public function testContentTypeListVisitsChildren() { $visitor = $this->getVisitor(); $generator = $this->getGenerator(); $generator->startDocument(null); $contentTypeList = new ContentTypeList(array(new ContentType\ContentType(array('fieldDefinitions' => array())), new ContentType\ContentType(array('fieldDefinitions' => array()))), '/content/typegroups/2/types'); $this->getVisitorMock()->expects($this->exactly(2))->method('visitValueObject')->with($this->isInstanceOf('eZ\\Publish\\Core\\REST\\Server\\Values\\RestContentType')); $visitor->visit($this->getVisitorMock(), $generator, $contentTypeList); }