From: Marcus Boerger Date: Tue, 30 Jan 2007 07:29:45 +0000 (+0000) Subject: - Add new test X-Git-Tag: RELEASE_1_0_0RC1~65 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9a866884742e43ef2911085f2bc7c604fe6ff8c;p=php - Add new test --- 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===