Lines Matching refs:phar
2 Phar: getAlias() with an existing phar.zip
4 <?php if (!extension_loaded("phar")) die("skip"); ?>
6 phar.readonly=0
10 $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip';
12 // sanity check with a virgin phar.zip
13 $phar = new Phar($fname);
14 var_dump($phar->getAlias());
15 unset($phar);
17 copy(dirname(__FILE__) . '/files/metadata.phar.zip', $fname);
19 // existing phar.zip, no alias set
20 $phar = new Phar($fname);
21 var_dump($phar->getAlias());
24 $phar->setAlias('jiminycricket');
25 var_dump($phar->getAlias());
26 unset($phar);
28 // existing phar.zip, alias set
29 $phar = new Phar($fname);
30 var_dump($phar->getAlias());
34 $phar['.phar/alias.txt'] = 'pinocchio';
38 var_dump($phar->getAlias());
41 $phar->setAlias('pinocchio');
42 var_dump($phar->getAlias());
48 unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
52 string(%d) "%sgetalias.phar.zip"
53 string(%d) "%sgetalias.phar.zip"
56 Cannot set alias ".phar/alias.txt" directly in phar "%sgetalias.phar.zip", use setAlias