]> granicus.if.org Git - php/commitdiff
- Missed the files we don't use yet
authorSteph Fox <sfox@php.net>
Sun, 31 Aug 2008 21:09:10 +0000 (21:09 +0000)
committerSteph Fox <sfox@php.net>
Sun, 31 Aug 2008 21:09:10 +0000 (21:09 +0000)
ext/phar/tests/cache_list/files/blog.phar [new file with mode: 0644]
ext/phar/tests/cache_list/files/blog.phar.inc [new file with mode: 0644]
ext/phar/tests/cache_list/files/config.xml [new file with mode: 0644]
ext/phar/tests/cache_list/files/extracted.inc [new file with mode: 0644]

diff --git a/ext/phar/tests/cache_list/files/blog.phar b/ext/phar/tests/cache_list/files/blog.phar
new file mode 100644 (file)
index 0000000..58c8a3b
Binary files /dev/null and b/ext/phar/tests/cache_list/files/blog.phar differ
diff --git a/ext/phar/tests/cache_list/files/blog.phar.inc b/ext/phar/tests/cache_list/files/blog.phar.inc
new file mode 100644 (file)
index 0000000..62d86c5
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+$fname = dirname(__FILE__) . '/blog.phar';
+@unlink($fname);
+
+$phar = new Phar($fname);
+$phar->setStub('<?php if(file_exists(dirname(__FILE__) . "/files/config.xml")) {
+    Phar::mount("config.xml", dirname(__FILE__) . "/files/config.xml");
+}
+Phar::webPhar("blog", "index.php");
+__HALT_COMPILER(); ?>');
+$phar['index.php'] = '<?php if (!file_exists("config.xml")) {
+       include "install.php";
+       exit;
+}
+var_dump(file_get_contents("config.xml"));
+?>';
+$phar['install.php'] = '<?php echo "install\n"; ?>';
+
+?>
diff --git a/ext/phar/tests/cache_list/files/config.xml b/ext/phar/tests/cache_list/files/config.xml
new file mode 100644 (file)
index 0000000..cf0dbc5
--- /dev/null
@@ -0,0 +1,9 @@
+<xml version="1.0" encoding="UTF-8">
+<config>
+ <database>
+  <host>localhost</name>
+  <user>squirrel</user>
+  <pass>nuts</pass>
+  <db>hoard</db>
+ </database>
+</config>
diff --git a/ext/phar/tests/cache_list/files/extracted.inc b/ext/phar/tests/cache_list/files/extracted.inc
new file mode 100644 (file)
index 0000000..a6e5224
--- /dev/null
@@ -0,0 +1 @@
+<?php var_dump(__FILE__); ?>