public function testCopyToCopyError() { $this->createPhar(); $root = vfsStream::newDirectory('test'); $root->addChild(vfsStream::newFile('test.phar', 00)); $this->setExpectedException('Herrera\\Phar\\Update\\Exception\\FileException', 'failed to open stream'); $this->update->copyTo('vfs://test/test.phar'); }