aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Archive/TARTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Archive/TARTest.php')
-rw-r--r--tests/lib/Archive/TARTest.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/lib/Archive/TARTest.php b/tests/lib/Archive/TARTest.php
new file mode 100644
index 00000000000..e77f97ac8e1
--- /dev/null
+++ b/tests/lib/Archive/TARTest.php
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace Test\Archive;
+
+use OC\Archive\TAR;
+use OCP\ITempManager;
+use OCP\Server;
+
+class TARTest extends TestBase {
+ protected function getExisting() {
+ $dir = \OC::$SERVERROOT . '/tests/data';
+ return new TAR($dir . '/data.tar.gz');
+ }
+
+ protected function getNew() {
+ return new TAR(Server::get(ITempManager::class)->getTemporaryFile('.tar.gz'));
+ }
+}