/** * @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()); }