Annotation of embedaddon/php/ext/phar/tests/pharfileinfo_chmod.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Phar: PharFileInfo::chmod extra code coverage
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("phar")) die("skip"); ?>
! 5: --INI--
! 6: phar.readonly=0
! 7: --FILE--
! 8: <?php
! 9: $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar';
! 10: $pname = 'phar://' . $fname;
! 11:
! 12: $phar = new Phar($fname);
! 13:
! 14: $phar['a/b'] = 'hi there';
! 15:
! 16: $b = $phar['a/b'];
! 17: try {
! 18: $phar['a']->chmod(066);
! 19: } catch (Exception $e) {
! 20: echo $e->getMessage(), "\n";
! 21: }
! 22: $b->chmod(array());
! 23: lstat($pname . '/a/b'); // sets BG(CurrentLStatFile)
! 24: $b->chmod(0666);
! 25: ?>
! 26: ===DONE===
! 27: --CLEAN--
! 28: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?>
! 29: --EXPECTF--
! 30: Phar entry "a" is a temporary directory (not an actual entry in the archive), cannot chmod
! 31:
! 32: Warning: PharFileInfo::chmod() expects parameter 1 to be long, array given in %spharfileinfo_chmod.php on line %d
! 33: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>