[Pkg-owncloud-commits] [owncloud] 130/239: Added unit test for "overwrite file on rename/move"

David Prévot taffit at moszumanska.debian.org
Fri Nov 29 01:32:28 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit af7118aa5db19165bcded3c860b3163488d7b6f6
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Mon Nov 25 18:52:14 2013 +0100

    Added unit test for "overwrite file on rename/move"
    
    Also fixed "rename" unit test that was ready the result out of the wrong
    file.
---
 tests/lib/files/storage/storage.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php
index 6c433e9..be53463 100644
--- a/tests/lib/files/storage/storage.php
+++ b/tests/lib/files/storage/storage.php
@@ -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'));
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list