From 754603a04e24a40778816d9965fe31ac7b407910 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 28 Mar 2022 18:53:20 +0200 Subject: dont needlessly resolve path when getting internalPath/storage from Node Signed-off-by: Robin Appelman --- tests/lib/Files/Node/FileTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/lib/Files/Node/FileTest.php') 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() { -- cgit v1.2.3