1--TEST--
2Phar: PharFileInfo::chmod extra code coverage
3--EXTENSIONS--
4phar
5--INI--
6phar.readonly=0
7--FILE--
8<?php
9$fname = __DIR__ . '/' . 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'];
17try {
18$phar['a']->chmod(066);
19} catch (Exception $e) {
20echo $e->getMessage(), "\n";
21}
22lstat($pname . '/a/b'); // sets BG(CurrentLStatFile)
23$b->chmod(0666);
24?>
25--CLEAN--
26<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?>
27--EXPECT--
28Phar entry "a" is a temporary directory (not an actual entry in the archive), cannot chmod
29