2012-03-28 16:32:51 -04:00
|
|
|
<?php
|
|
|
|
|
/**
|
2024-05-10 09:09:14 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2012-03-28 16:32:51 -04:00
|
|
|
*/
|
|
|
|
|
|
2016-05-18 12:46:03 -04:00
|
|
|
namespace Test\Archive;
|
|
|
|
|
|
2016-05-02 01:23:14 -04:00
|
|
|
use OC\Archive\TAR;
|
|
|
|
|
|
2016-05-18 12:46:03 -04:00
|
|
|
class TARTest extends TestBase {
|
2012-10-05 16:24:36 -04:00
|
|
|
protected function getExisting() {
|
2016-05-18 12:46:03 -04:00
|
|
|
$dir = \OC::$SERVERROOT . '/tests/data';
|
2016-05-02 01:23:14 -04:00
|
|
|
return new TAR($dir . '/data.tar.gz');
|
2012-10-05 16:24:36 -04:00
|
|
|
}
|
2012-03-28 16:32:51 -04:00
|
|
|
|
2012-10-05 16:24:36 -04:00
|
|
|
protected function getNew() {
|
2018-03-19 05:52:35 -04:00
|
|
|
return new TAR(\OC::$server->getTempManager()->getTemporaryFile('.tar.gz'));
|
2012-03-28 16:32:51 -04:00
|
|
|
}
|
|
|
|
|
}
|