]> granicus.if.org Git - php/commitdiff
parameter count test
authorGreg Beaver <cellog@php.net>
Wed, 7 Dec 2005 01:47:49 +0000 (01:47 +0000)
committerGreg Beaver <cellog@php.net>
Wed, 7 Dec 2005 01:47:49 +0000 (01:47 +0000)
ext/phar/tests/002.phpt [new file with mode: 0644]

diff --git a/ext/phar/tests/002.phpt b/ext/phar/tests/002.phpt
new file mode 100644 (file)
index 0000000..131f206
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+PHP_Archive::mapPhar improper parameters
+--SKIPIF--
+<?php if (!extension_loaded("phar")) print "skip"; ?>
+--FILE--
+<?php
+PHP_Archive::mapPhar();
+PHP_Archive::mapPhar(5);
+PHP_Archive::mapPhar(5, 5);
+PHP_Archive::mapPhar(5, 'hio');
+PHP_Archive::mapPhar(5, 'hio', 'hi');
+PHP_Archive::mapPhar(5, 'hio', true, 5, 5);
+?>
+--EXPECTF--
+Warning: PHP_Archive::mapPhar() expects at least 3 parameters, 0 given in %s on line %d
+
+Warning: PHP_Archive::mapPhar() expects at least 3 parameters, 1 given in %s on line %d
+
+Warning: PHP_Archive::mapPhar() expects at least 3 parameters, 2 given in %s on line %d
+
+Warning: PHP_Archive::mapPhar() expects at least 3 parameters, 2 given in %s on line %d
+
+Warning: PHP_Archive::mapPhar() expects at most 4 parameters, 5 given in %s on line %d
\ No newline at end of file