Skip to content

Commit 1533fe5

Browse files
committed
Add one more test to safeguard against potential regressions
This test safeguards against potential regressions for the non-problematic bug fix.
1 parent 90348ee commit 1533fe5

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//end closingBraceAtEndOfFileMissingComment()
2+
3+
<?php
4+
5+
// This should be the only test in this file.
6+
// Testing that the sniff is triggered and the fixer works when the closing bracket is
7+
// the last character in the file (no newline after it) and the content of the first token
8+
// is a "//end closingBraceAtEndOfFileMissingComment()" comment.
9+
10+
function closingBraceAtEndOfFileMissingComment() {
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//end closingBraceAtEndOfFileMissingComment()
2+
3+
<?php
4+
5+
// This should be the only test in this file.
6+
// Testing that the sniff is triggered and the fixer works when the closing bracket is
7+
// the last character in the file (no newline after it) and the content of the first token
8+
// is a "//end closingBraceAtEndOfFileMissingComment()" comment.
9+
10+
function closingBraceAtEndOfFileMissingComment() {
11+
}//end closingBraceAtEndOfFileMissingComment()

src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ public function getErrorList($testFile='')
5555
case 'ClosingDeclarationCommentUnitTest.4.inc':
5656
return [8 => 1];
5757

58+
case 'ClosingDeclarationCommentUnitTest.5.inc':
59+
return [11 => 1];
60+
5861
default:
5962
return [];
6063
}//end switch

0 commit comments

Comments
 (0)