From e7edf893b9ac4a5e97459e0c00c16321ab27465d Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Sun, 31 Mar 2024 08:52:31 +0200 Subject: [PATCH] chore: allow phpunit 9 --- test/HTML5/Html5Test.php | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/test/HTML5/Html5Test.php b/test/HTML5/Html5Test.php index 9fa29bf..76d0dc9 100644 --- a/test/HTML5/Html5Test.php +++ b/test/HTML5/Html5Test.php @@ -93,13 +93,11 @@ public function testEncodingUtf8() $this->assertEmpty($this->html5->getErrors()); $this->assertFalse($this->html5->hasErrors()); - # phpunit 9 - if(method_exists($this, 'assertStringContainsString')) - { - $this->assertStringContainsString('Žťčýů', $dom->saveHTML()); - } - else{ - $this->assertContains('Žťčýů', $dom->saveHTML()); + // phpunit 9 + if(method_exists($this, 'assertStringContainsString')) { + $this->assertStringContainsString('Žťčýů', $dom->saveHTML()); + } else { + $this->assertContains('Žťčýů', $dom->saveHTML()); } } @@ -381,12 +379,10 @@ public function testAttributes() { $res = $this->cycle(''); - # phpunit 9 - if(method_exists($this, 'assertStringContainsString')) - { + // phpunit 9 + if(method_exists($this, 'assertStringContainsString')) { $this->assertStringContainsString('', $res); - } - else{ + } else { $this->assertContains('', $res); } @@ -503,12 +499,10 @@ public function testAnchorTargetQueryParam() { $res = $this->cycle('https://domain.com/page.php?foo=bar&target=baz'); - # phpunit 9 - if(method_exists($this, 'assertStringContainsString')) - { + // phpunit 9 + if(method_exists($this, 'assertStringContainsString')) { $this->assertStringContainsString('https://domain.com/page.php?foo=bar&target=baz', $res); - } - else{ + } else { $this->assertContains('https://domain.com/page.php?foo=bar&target=baz', $res); } }