0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-05-20 13:10:13 +00:00
nextcloud_server/tests/lib/Archive/ZIPTest.php
Joas Schilling e0a1c84ebb
test: Make Archive test order independent
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-05-15 08:25:00 +02:00

25 lines
586 B
PHP

<?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\ZIP;
class ZIPTest extends TestBase {
protected function getExisting() {
$dir = \OC::$SERVERROOT . '/tests/data';
return new ZIP($dir . '/data.zip');
}
protected function getNew() {
$newZip = \OC::$server->getTempManager()->getTempBaseDir() . '/newArchive.zip';
if (file_exists($newZip)) {
unlink($newZip);
}
return new ZIP($newZip);
}
}