[Pkg-owncloud-commits] [owncloud] 78/95: Add unit test
David Prévot
taffit at moszumanska.debian.org
Wed Mar 11 15:49:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.0.1
in repository owncloud.
commit 810ac0fca705736bab113e0e2593fc6208a50684
Author: Robin Appelman <icewind at owncloud.com>
Date: Thu Feb 26 12:20:20 2015 +0100
Add unit test
---
tests/lib/files/node/node.php | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tests/lib/files/node/node.php b/tests/lib/files/node/node.php
index 49a2006..01ed84c 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();
+ }
}
--
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