Fixes a long standing issue with PATH environment variable when _ENV is not set ...
[phpt.git] / tests / misc / issue-2.phpt
blobca724a586babddd58e35412552a3ece7ea2bf9c9
1 --TEST--
2 PATH environment variable should be the same as the current PATH
3 --FILE--
4 <?php
6 require_once dirname(__FILE__) . '/../_setup.inc';
8 $contents = "--TEST--\n" .
9             "foobar\n" .
10             "--FILE--\n" .
11             "<?php\n" .
12             "echo getenv('PATH'), \"" . '\n' ."\"\n" .
13             "?>\n" .
14             "--EXPECTF--\n" .
15             "%s";
16 $test_case_file = dirname(__FILE__) . '/foobar.phpt';
17 file_put_contents($test_case_file, $contents);
19 $parser = new PHPT_Case_Parser();
20 $case = $parser->parse($test_case_file);
21 $case->run(new PHPT_Reporter_Null());
22 assert('trim($case->result->output) == getenv("PATH")');
25 ===DONE===
26 --CLEAN--
27 <?php unlink(dirname(__FILE__) . '/foobar.phpt'); ?>
28 --EXPECT--
29 ===DONE===