Change behavior of Section_ENV to require running (fixes #19)
[phpt.git] / tests / Section / Env / script-filename-should-equal-filename-of-case-that-runs-env.phpt
blobb7d601e744dc385a7d5a097c120fc99d472d3e31
1 --TEST--
2 When PHPT_Section_ENV::run() is called, the data['SCRIPT_FILENAME']
3 value should always equal the provided Case's filename property.
4 --FILE--
5 <?php
7 require_once dirname(__FILE__) . '/../../_setup.inc';
8 require_once dirname(__FILE__) . '/_simple-test-case.inc';
10 $case = new PHPT_SimpleTestCase();
11 $filename = 'some-random-file-' . rand(100, 200);
12 $case->filename = $filename;
13 $env = new PHPT_Section_ENV('foo=bar');
15 $env->run($case);
16 assert('$env->data["SCRIPT_FILENAME"] == $filename');
19 ===DONE===
20 --EXPECT--
21 ===DONE===