/** * @covers phpDocumentor\Descriptor\ProjectDescriptor::__construct * @covers phpDocumentor\Descriptor\ProjectDescriptor::setPartials * @covers phpDocumentor\Descriptor\ProjectDescriptor::getPartials */ public function testGetSetPartials() { $result = $this->fixture->getPartials(); $this->assertInstanceOf('phpDocumentor\\Descriptor\\Collection', $result); $partialsCollection = new Collection(); $this->fixture->setPartials($partialsCollection); $result = $this->fixture->getPartials(); $this->assertSame($partialsCollection, $result); }
protected function buildPartials(\DOMElement $parent, ProjectDescriptor $project) { $child = new \DOMElement('partials'); $parent->appendChild($child); foreach ($project->getPartials() as $name => $element) { $partial = new \DOMElement('partial'); $child->appendChild($partial); $partial->setAttribute('name', $name); $partial->appendChild(new \DOMText($element)); } }