/** * @dataProvider accessNameProvider */ public function testFopenOverwriteEncoding($accessName) { $this->sourceStorage->file_put_contents(self::NFD_NAME, 'bar'); $fh = $this->instance->fopen($accessName, 'w'); $data = fputs($fh, 'test'); fclose($fh); $data = $this->sourceStorage->file_get_contents(self::NFD_NAME); $this->assertEquals('test', $data); $this->assertFalse($this->sourceStorage->file_exists(self::NFC_NAME)); }
public function testFilePutContentsRooted() { $this->instance->file_put_contents('bar', 'asd'); $this->assertEquals('asd', $this->sourceStorage->file_get_contents('foo/bar')); }