add result property to Case (re #36)
[phpt.git] / tests / Case / Parser / handles-windows-eols.phpt
bloba3c6bd27e79610056832ccea7e44df2ed6715e88
1 --TEST--
2 If phpt file has Windows EOLs, it should still parse properly.
4 A work around for PHP bug 43474 and a fixes Issue 4 in the code tracker
5 --FILE--
6 <?php
8 require_once dirname(__FILE__) . '/_setup.inc';
10 $code = "--TEST--\r\n" .
11         "foobar\r\n" .
12         "--FILE--\r\n" .
13         "hello world\r\n" .
14         "--EXPECT--\r\n" .
15         "hello world\r\n";
17 file_put_contents(dirname(__FILE__) . '/foobar.php', $code);
19 $parser = new PHPT_Case_Parser();
20 $case = $parser->parse(dirname(__FILE__) . '/foobar.php');
22 assert('$case instanceof PHPT_Case');
25 ===DONE===
26 --CLEAN--
27 <?php unlink(dirname(__FILE__) . '/foobar.php'); ?>
28 --EXPECT--
29 ===DONE===