From c9a866884742e43ef2911085f2bc7c604fe6ff8c Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Tue, 30 Jan 2007 07:29:45 +0000 Subject: [PATCH] - Add new test --- ext/phar/tests/phar_begin_setstub_commit.phpt | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 ext/phar/tests/phar_begin_setstub_commit.phpt diff --git a/ext/phar/tests/phar_begin_setstub_commit.phpt b/ext/phar/tests/phar_begin_setstub_commit.phpt new file mode 100755 index 0000000000..9f815da319 --- /dev/null +++ b/ext/phar/tests/phar_begin_setstub_commit.phpt @@ -0,0 +1,41 @@ +--TEST-- +Phar::begin()/setStub()/commit() +--SKIPIF-- + +--INI-- +phar.require_hash=0 +phar.readonly=0 +--FILE-- +getStub()); +$p->begin(); +$p['a.php'] = 'setStub(''); +include 'phar://brandnewphar.phar/a.php'; +var_dump($p->getStub()); +$p['b.php'] = 'setStub(''); +include 'phar://brandnewphar.phar/b.php'; +var_dump($p->getStub()); +$p->commit(); +echo "===COMMIT===\n"; +include 'phar://brandnewphar.phar/a.php'; +include 'phar://brandnewphar.phar/b.php'; +var_dump($p->getStub()); +?> +===DONE=== +--CLEAN-- + +--EXPECT-- +string(5) "Hello" +string(82) "" +string(5) "World" +string(83) "" +===COMMIT=== +string(5) "Hello" +string(5) "World" +string(83) "" +===DONE=== -- 2.40.0