Skip to content
Snippets Groups Projects
Commit af7118aa authored by Vincent Petry's avatar Vincent Petry
Browse files

Added unit test for "overwrite file on rename/move"

Also fixed "rename" unit test that was ready the result out of the wrong
file.
parent 1b0c5e57
Branches
No related tags found
No related merge requests found
......@@ -139,6 +139,12 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
$this->instance->rename('/source.txt', '/target2.txt');
$this->assertTrue($this->instance->file_exists('/target2.txt'));
$this->assertFalse($this->instance->file_exists('/source.txt'));
$this->assertEquals(file_get_contents($textFile), $this->instance->file_get_contents('/target2.txt'));
// move to overwrite
$this->instance->rename('/target2.txt', '/target.txt');
$this->assertTrue($this->instance->file_exists('/target.txt'));
$this->assertFalse($this->instance->file_exists('/target2.txt'));
$this->assertEquals(file_get_contents($textFile), $this->instance->file_get_contents('/target.txt'));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment