File tree Expand file tree Collapse file tree 3 files changed +26
-16
lines changed
src/Standards/Squiz/Tests/PHP Expand file tree Collapse file tree 3 files changed +26
-16
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ $ str = <<<EOD
3+ Example of string
4+ spanning multiple lines
5+ using heredoc syntax.
6+ EOD ;
7+
8+ echo <<<'EOT'
9+ My name is "$name". I am printing some $foo->foo.
10+ Now, I am printing some {$foo->bar[1]}.
11+ This should not print a capital 'A': \x41
12+ EOT;
Original file line number Diff line number Diff line change 11<?php
2- $ str = <<<EOD
3- Example of string
4- spanning multiple lines
5- using heredoc syntax.
6- EOD ;
7-
8- echo <<<'EOT'
9- My name is "$name". I am printing some $foo->foo.
10- Now, I am printing some {$foo->bar[1]}.
11- This should not print a capital 'A': \x41
12- EOT;
132
3+ // Intentional parse error.
144// The following function has a simulated git conflict for testing.
155// This is not a merge conflict - it is a valid test case.
166// Please do not remove.
Original file line number Diff line number Diff line change @@ -26,14 +26,22 @@ class HeredocUnitTest extends AbstractSniffUnitTest
2626 * The key of the array should represent the line number and the value
2727 * should represent the number of errors that should occur on that line.
2828 *
29+ * @param string $testFile The name of the file being tested.
30+ *
2931 * @return array<int, int>
3032 */
31- public function getErrorList ()
33+ public function getErrorList ($ testFile = '' )
3234 {
33- return [
34- 2 => 1 ,
35- 8 => 1 ,
36- ];
35+ switch ($ testFile ) {
36+ case 'HeredocUnitTest.1.inc ' :
37+ return [
38+ 2 => 1 ,
39+ 8 => 1 ,
40+ ];
41+
42+ default :
43+ return [];
44+ }//end switch
3745
3846 }//end getErrorList()
3947
You can’t perform that action at this time.
0 commit comments