0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-02-22 16:09:14 +00:00
nextcloud_server/tests/lib/Archive/ZIPTest.php
Côme Chilliet ec4fff20e8
Avoid Deprecation warning from Zip tests on PHP 8.1
It is not allowed anymore to open an empty file as a new zip archive.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:58:40 +01:00

22 lines
517 B
PHP

<?php
/**
* Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
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() {
return new ZIP(\OC::$server->getTempManager()->getTempBaseDir().'/newArchive.zip');
}
}