Exemple #1
0
 /**
  * Tests Target::unlink
  */
 public function testUnlinkSuccess()
 {
     $path = sys_get_temp_dir() . '/foo';
     $filename = 'foo.txt';
     $target = new Target($path, $filename);
     $target->setupPath();
     // create the file
     file_put_contents($target->getPathname(), 'content');
     $target->unlink();
     rmdir($target->getPath());
     $this->assertFalse(file_exists($target->getPathname()));
     $this->assertFalse(is_dir($target->getPath()));
 }