summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-02-27 02:56:13 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2015-02-27 02:56:13 -0800
commit7fe07e93fe4706962d2957d252b009513459d15e (patch)
tree306f1219e4bccdba2e09ececfe5432a163f66eda /tests
parent1c6857d92c835d499e37bebd24aaf325373dc7f1 (diff)
parent541c8c092db947814a25f452a78a38f2cd2ff791 (diff)
downloadnextcloud-server-7fe07e93fe4706962d2957d252b009513459d15e.tar.gz
nextcloud-server-7fe07e93fe4706962d2957d252b009513459d15e.zip
Merge pull request #14437 from owncloud/node-check-fileinfo
Check if we have a proper fileinfo
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/node/node.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/lib/files/node/node.php b/tests/lib/files/node/node.php
index 49a2006c767..01ed84c4a06 100644
--- a/tests/lib/files/node/node.php
+++ b/tests/lib/files/node/node.php
@@ -340,4 +340,19 @@ class Node extends \Test\TestCase {
$node = new \OC\Files\Node\Node($root, $view, '/bar/foo');
$node->touch(100);
}
+
+ /**
+ * @expectedException \OCP\Files\InvalidPathException
+ */
+ public function testInvalidPath() {
+ $manager = $this->getMock('\OC\Files\Mount\Manager');
+ /**
+ * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ */
+ $view = $this->getMock('\OC\Files\View');
+ $root = $this->getMock('\OC\Files\Node\Root', array(), array($manager, $view, $this->user));
+
+ $node = new \OC\Files\Node\Node($root, $view, '/../foo');
+ $node->getFileInfo();
+ }
}