Revert "add some cleanup so files don't get left around"
[phpt.git] / tests / Case / output-after-run.phpt
blobeed96d0d9c4781575b797ec893ff7f99fcdb97ad
1 --TEST--
2 After PHPT_Case::run(), the $output property should contain the results
3 if the test case.
4 --FILE--
5 <?php
7 require_once dirname(__FILE__) . '/../_setup.inc';
9 $random = rand(100, 200);
10 $case_data = '<?php echo "' . $random . '"; ?>';
11 $file = new PHPT_Section_FILE($case_data);
12 $file->filename = dirname(__FILE__) . '/fake-test-case.php';
13 $sections = new PHPT_SectionList(array(
14     new PHPT_Section_TEST('foobar'),
15     $file
16 ));
18 $case = new PHPT_Case($sections, dirname(__FILE__) . '/fake-test-case.phpt');
19 $case->run(new PHPT_Reporter_Null());
20 assert('$case->output == $random');
23 ===DONE===
24 --EXPECT--
25 ===DONE===