[Pkg-owncloud-commits] [owncloud] 09/15: add unit tests for null handling in view
David Prévot
taffit at moszumanska.debian.org
Thu Jul 2 18:39:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.0.5RC1
in repository owncloud.
commit eb76504df6a78111ccedeb2ef0a4deec1b640cca
Author: Robin Appelman <icewind at owncloud.com>
Date: Wed Apr 22 16:24:25 2015 +0200
add unit tests for null handling in view
---
tests/lib/files/view.php | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php
index c8629ab..f064eaa 100644
--- a/tests/lib/files/view.php
+++ b/tests/lib/files/view.php
@@ -1033,4 +1033,21 @@ class View extends \Test\TestCase {
$view = new \OC\Files\View('');
$this->assertTrue($view->rename('/test/foo.txt', '/test/foo/bar.txt'));
}
+
+ public function testGetAbsolutePathOnNull() {
+ $view = new \OC\Files\View();
+ $this->assertNull($view->getAbsolutePath(null));
+ }
+
+ public function testGetRelativePathOnNull() {
+ $view = new \OC\Files\View();
+ $this->assertNull($view->getRelativePath(null));
+ }
+
+ /**
+ * @expectedException \InvalidArgumentException
+ */
+ public function testNullAsRoot() {
+ new \OC\Files\View(null);
+ }
}
--
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