summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2008-04-23 16:50:19 +0000
committerGreg Beaver <cellog@php.net>2008-04-23 16:50:19 +0000
commit22878f0ea23deb56708f32cbd64209ad958d6736 (patch)
tree267acef148570681abdbd27baf14b94ea4e66b87
parentce5732112e449bb2cd80136f9beeaa7fa2fecc82 (diff)
downloadphp-git-22878f0ea23deb56708f32cbd64209ad958d6736.tar.gz
new test for valid callback that fails for rewrite callback
-rw-r--r--ext/phar/tests/files/frontcontroller16.pharbin330 -> 330 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller17.pharbin0 -> 315 bytes
-rw-r--r--ext/phar/tests/files/frontcontroller17.phar.inc16
-rw-r--r--ext/phar/tests/frontcontroller32.phpt14
4 files changed, 30 insertions, 0 deletions
diff --git a/ext/phar/tests/files/frontcontroller16.phar b/ext/phar/tests/files/frontcontroller16.phar
index 66fc145708..cce5db5bb5 100644
--- a/ext/phar/tests/files/frontcontroller16.phar
+++ b/ext/phar/tests/files/frontcontroller16.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller17.phar b/ext/phar/tests/files/frontcontroller17.phar
new file mode 100644
index 0000000000..b83d41fd5b
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller17.phar
Binary files differ
diff --git a/ext/phar/tests/files/frontcontroller17.phar.inc b/ext/phar/tests/files/frontcontroller17.phar.inc
new file mode 100644
index 0000000000..85b8729f31
--- /dev/null
+++ b/ext/phar/tests/files/frontcontroller17.phar.inc
@@ -0,0 +1,16 @@
+<?php
+@unlink(dirname(__FILE__) . '/frontcontroller17.phar');
+$a = new Phar(dirname(__FILE__) . '/frontcontroller17.phar');
+$a['index.php'] = '<?php
+echo "hi";
+';
+$a->setStub('<?php
+try {
+Phar::webPhar("test.phar", "/index.php", null, array(), "sort");
+} catch (Exception $e) {
+die($e->getMessage() . "\n");
+}
+echo "oops did not run\n";
+var_dump($_ENV, $_SERVER);
+__HALT_COMPILER();');
+?>
diff --git a/ext/phar/tests/frontcontroller32.phpt b/ext/phar/tests/frontcontroller32.phpt
new file mode 100644
index 0000000000..c463bbb683
--- /dev/null
+++ b/ext/phar/tests/frontcontroller32.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar front controller with valid callback that is not good
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--ENV--
+SCRIPT_NAME=/frontcontroller32.php
+REQUEST_URI=/frontcontroller32.php
+--EXPECTHEADERS--
+Content-type: text/html
+--FILE_EXTERNAL--
+files/frontcontroller17.phar
+--EXPECTF--
+Warning: Parameter 1 to sort() expected to be a reference, value given in %sfrontcontroller32.php on line 3
+phar error: failed to call rewrite callback \ No newline at end of file