예제 #1
0
 /**
  * Tests whether setting the source succeeds.
  *
  * @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('Exception');
     $this->fixture->setSource('/tmp');
     // unknown directories are not allowed
     $this->setExpectedException('Exception');
     $this->fixture->setSource('/tmpa');
     $this->markTestIncomplete('We still need to test the structure.xml changes that are induced ' . 'by the addMetaDataToStructure method');
 }