Annotation of embedaddon/php/ext/phar/tests/phar_commitwrite.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Phar::setStub()/stopBuffering()
        !             3: --SKIPIF--
        !             4: <?php if (!extension_loaded("phar")) die("skip"); ?>
        !             5: --INI--
        !             6: phar.require_hash=0
        !             7: phar.readonly=0
        !             8: --FILE--
        !             9: <?php
        !            10: $p = new Phar(dirname(__FILE__) . '/brandnewphar.phar', 0, 'brandnewphar.phar');
        !            11: $p['file1.txt'] = 'hi';
        !            12: $p->stopBuffering();
        !            13: var_dump(strlen($p->getStub()));
        !            14: $p->setStub("<?php
        !            15: function __autoload(\$class)
        !            16: {
        !            17:     include 'phar://' . str_replace('_', '/', \$class);
        !            18: }
        !            19: Phar::mapPhar('brandnewphar.phar');
        !            20: include 'phar://brandnewphar.phar/startup.php';
        !            21: __HALT_COMPILER();
        !            22: ?>");
        !            23: var_dump($p->getStub());
        !            24: ?>
        !            25: ===DONE===
        !            26: --CLEAN--
        !            27: <?php 
        !            28: unlink(dirname(__FILE__) . '/brandnewphar.phar');
        !            29: __HALT_COMPILER();
        !            30: ?>
        !            31: --EXPECT--
        !            32: int(6683)
        !            33: string(200) "<?php
        !            34: function __autoload($class)
        !            35: {
        !            36:     include 'phar://' . str_replace('_', '/', $class);
        !            37: }
        !            38: Phar::mapPhar('brandnewphar.phar');
        !            39: include 'phar://brandnewphar.phar/startup.php';
        !            40: __HALT_COMPILER(); ?>
        !            41: "
        !            42: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>