/** * @expectedException RuntimeException */ public function testDoubleUnlink() { $file = new File('/tmp/phpunit_test_unlink'); $this->assertFalse($file->exists()); $file->setContent('foo 42 bar'); $this->assertTrue($file->exists()); $file->unlink(); $this->assertFalse($file->exists()); $file->unlink(); }