示例#1
0
 /**
  * @param Phar $phar
  */
 public function removePhar(Phar $phar)
 {
     $pharNode = $this->getFirstMatchingPharNode($phar->getName(), $phar->getVersion());
     unlink($this->getPharDestination($phar->getFile()));
     $pharNode->parentNode->removeChild($pharNode);
     $this->save();
 }
示例#2
0
 /**
  * @dataProvider fileProvider
  *
  * @param File $file
  */
 public function testGetFile(File $file)
 {
     $phar = new Phar('foo', new Version('1.0.0'), $file);
     $this->assertEquals($file, $phar->getFile());
 }