add unit tests for null handling in view
This commit is contained in:
parent
f391f88d7f
commit
e302213248
|
@ -1063,4 +1063,21 @@ class View extends \Test\TestCase {
|
|||
$watcher = $storage->getWatcher();
|
||||
$this->assertEquals(Watcher::CHECK_NEVER, $watcher->getPolicy());
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue