diff options
Diffstat (limited to 'tests/lib/files/view.php')
-rw-r--r-- | tests/lib/files/view.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php index c8629abc409..f064eaaa7fd 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); + } } |