Skip to content

Commit

Permalink
Add one more test to safeguard against potential regressions
Browse files Browse the repository at this point in the history
This test safeguards against potential regressions for the
non-problematic bug fix.
  • Loading branch information
rodrigoprimo committed Apr 8, 2024
1 parent 90348ee commit 1533fe5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//end closingBraceAtEndOfFileMissingComment()

<?php

// This should be the only test in this file.
// Testing that the sniff is triggered and the fixer works when the closing bracket is
// the last character in the file (no newline after it) and the content of the first token
// is a "//end closingBraceAtEndOfFileMissingComment()" comment.

function closingBraceAtEndOfFileMissingComment() {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//end closingBraceAtEndOfFileMissingComment()

<?php

// This should be the only test in this file.
// Testing that the sniff is triggered and the fixer works when the closing bracket is
// the last character in the file (no newline after it) and the content of the first token
// is a "//end closingBraceAtEndOfFileMissingComment()" comment.

function closingBraceAtEndOfFileMissingComment() {
}//end closingBraceAtEndOfFileMissingComment()
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public function getErrorList($testFile='')
case 'ClosingDeclarationCommentUnitTest.4.inc':
return [8 => 1];

case 'ClosingDeclarationCommentUnitTest.5.inc':
return [11 => 1];

default:
return [];
}//end switch
Expand Down

0 comments on commit 1533fe5

Please sign in to comment.