public function testWrite() { $this->root->addChild(new vfsStreamDirectory('copy')); $dir = $this->root->getChild('copy'); $file = vfsStream::newFile('copy.txt')->withContent('copy')->at($dir); $this->files->write($file->url(), 'copy new'); $this->assertSame('copy new', $this->files->read($file->url())); $this->files->write($file->url(), 'copy new visibility', ['visibility' => 'private']); $this->assertSame('copy new visibility', $this->files->read($file->url())); $this->assertSame('private', $this->files->getVisibility($file->url())); }