コード例 #1
0
 /**
  * Tests whether setting a target succeed.
  *
  * @covers phpDocumentor\Transformer\Transformer::getTarget
  * @covers phpDocumentor\Transformer\Transformer::setTarget
  *
  * @return void
  */
 public function testTarget()
 {
     $this->assertEquals('', $this->fixture->getTarget());
     $this->fixture->setTarget(dirname(__FILE__));
     $this->assertEquals(dirname(__FILE__), $this->fixture->getTarget());
     // only directories are accepted, not files
     $this->setExpectedException('\\InvalidArgumentException');
     $this->fixture->setTarget(__FILE__);
     // only valid directories are accepted
     $this->setExpectedException('\\InvalidArgumentException');
     $this->fixture->setTarget(dirname(__FILE__) . 'a');
 }