-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generic/ByteOrderMark: improve test coverage
This commit adds four more tests case files: * 2 to cover the cases where the sniff is triggered but the file does not contain a BOM character. One of these files is in UTF-8 encoding without a BOM, the other is in ANSI/iso-8859-1 encoding. * 2 to cover the different UTF-16 encodings with a BOM character. Includes adding a comment to the original test case file to document the encoding (UTF-8 with BOM) of that file.
- Loading branch information
1 parent
39b2fed
commit a9642e5
Showing
6 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
7 changes: 4 additions & 3 deletions
7
src/Standards/Generic/Tests/Files/ByteOrderMarkUnitTest.1.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<?php | ||
echo 'foo'; | ||
?> | ||
<?php | ||
// File in UTF-8 encoding with byte order mark (BOM) character before the opening PHP tag. | ||
echo 'foo'; | ||
?> |
3 changes: 3 additions & 0 deletions
3
src/Standards/Generic/Tests/Files/ByteOrderMarkUnitTest.2.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php // File in UTF-8 encoding without a byte order mark (BOM) character before the opening PHP tag. ?> | ||
|
||
<p>Some HTML</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>Some HTML at the beginning of an ANSI/iso-8859-1 encoded file without a byte order mark (BOM) character</p> |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters