summaryrefslogtreecommitdiff
path: root/ext/phar/tests/files/include_path.phar.inc
diff options
context:
space:
mode:
Diffstat (limited to 'ext/phar/tests/files/include_path.phar.inc')
-rw-r--r--ext/phar/tests/files/include_path.phar.inc19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/phar/tests/files/include_path.phar.inc b/ext/phar/tests/files/include_path.phar.inc
new file mode 100644
index 0000000..448c87f
--- /dev/null
+++ b/ext/phar/tests/files/include_path.phar.inc
@@ -0,0 +1,19 @@
+<?php
+// test advanced example
+$phar = new Phar(dirname(__FILE__) . '/include_path.phar');
+$phar2 = new Phar(dirname(__FILE__) . '/include_path2.phar');
+$phar2['file1.php'] = 'file1.php
+';
+$phar2['test/file1.php'] = 'test/file1.php
+';
+$phar['hello/test.php'] = '<?php
+include "file1.php";';
+
+$phar->setStub("<?php
+set_include_path('.' . PATH_SEPARATOR . 'phar://' . dirname(__FILE__) . '/files/include_path2.phar' );
+include 'phar://' . __FILE__ . '/hello/test.php';
+set_include_path('.' . PATH_SEPARATOR . 'phar://' . dirname(__FILE__) . '/files/include_path2.phar/test');
+include 'phar://' . __FILE__ . '/hello/test.php';
+echo \"ok\\n\";
+__HALT_COMPILER();
+?>");