add @todo note
[phpt.git] / tests / misc / issue-2.phpt
blob19aa83c134f974088a39a1c5c17745c2b9a2f3a6
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--" . PHP_EOL .
9             "foobar" . PHP_EOL .
10             "--FILE--" . PHP_EOL .
11             "<?php" . PHP_EOL .
12             "echo getenv('PATH'), PHP_EOL;" . PHP_EOL .
13             "?>" . PHP_EOL .
14             "--EXPECTF--" . PHP_EOL .
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) == trim(getenv("PATH"))');
25 ===DONE===
26 --CLEAN--
27 <?php unlink(dirname(__FILE__) . '/foobar.phpt'); ?>
28 --EXPECT--
29 ===DONE===