public function testWriteSaveAndDelete() { if (file_exists(__DIR__ . '/../tmp/file.txt')) { unlink(__DIR__ . '/../tmp/file.txt'); } $f = new File(__DIR__ . '/../tmp/file.txt'); $f->write('123')->write('456', true)->save(); $f->setPermissions(0777); $this->fileExists(__DIR__ . '/../tmp/file.txt'); $this->assertEquals('123456', $f->read()); $this->assertEquals(6, $f->getSize()); $this->assertEquals('text/plain', $f->getMime()); $f->delete(); $this->assertFalse(file_exists(__DIR__ . '/../tmp/file.txt')); }