Skip to content

Commit

Permalink
tweak: check for v8 (test expected result)
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Nov 13, 2021
1 parent f602f79 commit 35962a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/phpunit/DocumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ class DocumentTest extends TestCase {

public function testToStringEmpty() {
$sut = new Document();
$string = (string)$sut;
if(PHP_MAJOR_VERSION < 8) {
$expected = "";
if(PHP_MAJOR_VERSION >= 8) {
// To catch v8-specific EOL.
$string .= PHP_EOL;
$expected .= PHP_EOL;
}
self::assertEquals("", $string);
self::assertEquals($expected, (string)$sut);
}

public function testToString() {
Expand Down

0 comments on commit 35962a3

Please sign in to comment.