~ubuntu-branches/ubuntu/quantal/php5/quantal

« back to all changes in this revision

Viewing changes to ext/phar/tests/phar_running.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Sean Finney
  • Date: 2009-07-01 09:12:10 UTC
  • mto: (0.9.1) (1.1.17 upstream)
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: james.westby@ubuntu.com-20090701091210-go0h6506p62on17r
Tags: upstream-5.3.0
ImportĀ upstreamĀ versionĀ 5.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Phar: Phar::running()
 
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.php';
 
10
$pname = 'phar://' . $fname;
 
11
 
 
12
$phar = new Phar($fname);
 
13
$phar['index.php'] = '<?php
 
14
Phar::running(array());
 
15
var_dump(Phar::running());
 
16
var_dump(Phar::running(false));
 
17
?>';
 
18
include $pname . '/index.php';
 
19
var_dump(Phar::running());
 
20
?>
 
21
===DONE===
 
22
--CLEAN--
 
23
<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
 
24
--EXPECTF--
 
25
Warning: Phar::running() expects parameter 1 to be boolean, array given in phar://%sphar_running.phar.php/index.php on line 2
 
26
string(%d) "phar://%sphar_running.phar.php"
 
27
string(%d) "%sphar_running.phar.php"
 
28
string(0) ""
 
29
===DONE===