public function testMoveFail() { $someFile = vfsStream::newFile('old.txt', 0777); $this->root->addChild($someFile); $subdir = vfsStream::newDirectory('subdir', 00); $this->root->addChild($subdir); $file = new File($someFile->url()); $this->setExpectedException('PG\\Common\\File\\Exception\\DirectoryNotWritable'); $file->move($subdir->url()); }