Added unit test for "overwrite file on rename/move"
Also fixed "rename" unit test that was ready the result out of the wrong file.
This commit is contained in:
parent
1b0c5e57e5
commit
af7118aa5d
|
@ -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'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue