xref: /PHP-7.3/ext/zip/tests/zip_open_error.phpt (revision 4cc35aea)
1--TEST--
2zip_open() error conditions
3--CREDITS--
4Birgitte Kvarme <bitta@redpill-linpro.com>
5#PHPTestFest2009 Norway 2009-06-09 \o/
6--SKIPIF--
7<?php
8if(!extension_loaded('zip')) die('skip');
9?>
10--FILE--
11<?php
12echo "Test case 1:";
13$zip = zip_open("");
14
15echo "Test case 2:";
16$zip = zip_open("i_dont_care_about_this_parameter", "this_is_one_to_many");
17
18echo "Test case 3:\n";
19$zip = zip_open("/non_exisitng_directory/test_procedural.zip");
20echo is_resource($zip) ? "OK" : "Failure";
21?>
22--EXPECTF--
23Test case 1:
24Warning: zip_open(): Empty string as source in %s on line %d
25Test case 2:
26Warning: zip_open() expects exactly 1 parameter, 2 given in %s on line %d
27Test case 3:
28Failure
29