public function testMoveRemove() { $dir = OC::$SERVERROOT . '/tests/data'; $textFile = $dir . '/lorem.txt'; $this->instance = $this->getNew(); $this->instance->addFile('lorem.txt', $textFile); $this->assertFalse($this->instance->fileExists('target.txt')); $this->instance->rename('lorem.txt', 'target.txt'); $this->assertTrue($this->instance->fileExists('target.txt')); $this->assertFalse($this->instance->fileExists('lorem.txt')); $this->assertEquals(file_get_contents($textFile), $this->instance->getFile('target.txt')); $this->instance->remove('target.txt'); $this->assertFalse($this->instance->fileExists('target.txt')); }
public function file_put_contents($path, $data) { $path = $this->stripPath($path); return $this->archive->addFile($path, $data); }