aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/Node/FileTest.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-03-28 18:53:20 +0200
committerRobin Appelman <robin@icewind.nl>2022-04-04 15:40:24 +0200
commit754603a04e24a40778816d9965fe31ac7b407910 (patch)
tree418ba20b6656f70c51461f7428178e38fe154aa1 /tests/lib/Files/Node/FileTest.php
parent8b12c75ca258787591d765d301adb57bb4e53d26 (diff)
downloadnextcloud-server-754603a04e24a40778816d9965fe31ac7b407910.tar.gz
nextcloud-server-754603a04e24a40778816d9965fe31ac7b407910.zip
dont needlessly resolve path when getting internalPath/storage from Node
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Files/Node/FileTest.php')
-rw-r--r--tests/lib/Files/Node/FileTest.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/lib/Files/Node/FileTest.php b/tests/lib/Files/Node/FileTest.php
index c381fd9b2be..3305f9ac170 100644
--- a/tests/lib/Files/Node/FileTest.php
+++ b/tests/lib/Files/Node/FileTest.php
@@ -16,8 +16,12 @@ namespace Test\Files\Node;
* @package Test\Files\Node
*/
class FileTest extends NodeTest {
- protected function createTestNode($root, $view, $path) {
- return new \OC\Files\Node\File($root, $view, $path);
+ protected function createTestNode($root, $view, $path, array $data = [], $internalPath = '', $storage = null) {
+ if ($data || $internalPath || $storage) {
+ return new \OC\Files\Node\File($root, $view, $path, $this->getFileInfo($data, $internalPath, $storage));
+ } else {
+ return new \OC\Files\Node\File($root, $view, $path);
+ }
}
protected function getNodeClass() {