public function testRenameFail() { $someFile = vfsStream::newFile('old.txt', 0777); $this->root->addChild($someFile); $blockingFile = vfsStream::newFile('new.txt', 00); $this->root->addChild($blockingFile); $file = new File($someFile->url()); $this->setExpectedException('PG\\Common\\File\\Exception\\FileNotWritable'); $file->rename('new.txt'); }