Skip to content

Commit 6e45d9d

Browse files
committed
Generic/DisallowShortOpenTag: improve code coverage
1 parent 2e3c58b commit 6e45d9d

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.3.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Test warning for when short_open_tag is off.
22

3-
Some content <? echo $var; ?> Some more content
3+
Some content <? echo $var; ?> Some more content after PHP code
44

55
// Test multi-line.
66
Some content <?
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Although not the focus of this test, this is an intentional parse error when short_open_tag is on.
2+
// This should be the only test in this file.
3+
// Test that the sniff bails when short_open_tag is off and there is a token other than
4+
// T_INLINE_HTML after the short open tag and before the close tag.
5+
6+
<?<?php

src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ protected function getTestFiles($testFileBase)
3636
$testFiles[] = $testFileBase.'2.inc';
3737
} else {
3838
$testFiles[] = $testFileBase.'3.inc';
39+
$testFiles[] = $testFileBase.'4.inc';
3940
}
4041

4142
return $testFiles;

0 commit comments

Comments
 (0)