Skip to content

Commit 86c3c11

Browse files
Passing empty to ord() is deprecated in PHP 8.5
1 parent a2633d9 commit 86c3c11

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- "8.2"
2424
- "8.3"
2525
- "8.4"
26+
- "8.5"
2627

2728
steps:
2829
- name: Checkout code

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"php" : ">=5.3.0"
2525
},
2626
"require-dev": {
27-
"phpunit/phpunit" : "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9"
27+
"phpunit/phpunit" : "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9 || ^10"
2828
},
2929
"autoload": {
3030
"psr-4": {"Masterminds\\": "src"}

phpunit.xml.dist

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit colors="true" bootstrap="vendor/autoload.php">
2+
<phpunit
3+
colors="true"
4+
bootstrap="vendor/autoload.php"
5+
failOnDeprecation="true"
6+
displayDetailsOnTestsThatTriggerDeprecations="true"
7+
>
38
<testsuites>
49
<testsuite name="PHPUnit">
510
<directory>test/HTML5/</directory>

test/HTML5/Html5Test.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,4 +560,12 @@ public function testAnchorTargetQueryParam()
560560
$this->assertContains('<a href="https://domain.com/page.php?foo=bar&amp;target=baz">https://domain.com/page.php?foo=bar&amp;target=baz</a>', $res);
561561
}
562562
}
563+
564+
public function testEndsWithSlash()
565+
{
566+
$html = '<p>Visit <a href="http://example.com/">example.com</';
567+
$expected = '<p>Visit <a href="http://example.com/">example.com</a></p>';
568+
$doc = $this->html5->loadHTMLFragment($html);
569+
$this->assertSame($expected, $this->html5->saveHTML($doc));
570+
}
563571
}

0 commit comments

Comments
 (0)