/** * Tests whether setting the source succeeds. * * @covers phpDocumentor\Transformer\Transformer::getSource * @covers phpDocumentor\Transformer\Transformer::setSource * * @return void */ public function testSource() { $this->assertEquals('', $this->fixture->getSource()); file_put_contents('/tmp/test_structure.xml', '<structure></structure>'); $this->fixture->setSource('/tmp/test_structure.xml'); $this->assertInstanceOf('\\DOMDocument', $this->fixture->getSource()); // directories are not allowed $this->setExpectedException('\\InvalidArgumentException'); $this->fixture->setSource('/tmp'); // unknown directories are not allowed $this->setExpectedException('\\InvalidArgumentException'); $this->fixture->setSource('/tmpa'); $this->markTestIncomplete('We still need to test the structure.xml changes that are induced ' . 'by the addMetaDataToStructure method'); }