/** * @expectedException phootwork\file\exception\FileException */ public function testDeleteWithFailure() { $prj = new Directory($this->createProject()); $root = new Directory($this->root->url()); $root->setMode(0555); $prj->delete(); }
/** * @expectedException phootwork\file\exception\FileException */ public function testDeleteWithFailure() { $dir = new Directory($this->root->url() . '/dir'); $dir->make(); $file = new File($this->root->url() . '/dir/composer.json'); $file->touch(); $this->assertTrue($file->exists()); $dir->setMode(0555); $file->delete(); $this->assertFalse($file->exists()); }