diff options
author | Robin Appelman <robin@icewind.nl> | 2022-03-28 18:53:20 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-04-04 15:40:24 +0200 |
commit | 754603a04e24a40778816d9965fe31ac7b407910 (patch) | |
tree | 418ba20b6656f70c51461f7428178e38fe154aa1 /tests/lib/Files/Node/FileTest.php | |
parent | 8b12c75ca258787591d765d301adb57bb4e53d26 (diff) | |
download | nextcloud-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.php | 8 |
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() { |