mirror of
https://github.com/nextcloud/server.git
synced 2025-02-22 16:09:14 +00:00

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>
22 lines
517 B
PHP
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');
|
|
}
|
|
}
|