From eb6ca1a99b9c68f155eeb3b19ca7fff09c4a1d60 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 3 Mar 2025 23:53:33 +0100 Subject: [PATCH] tests: Use ::class for DOMDocument class name Also capitalize it properly. (cherry picked from commit 90869d877e0510966f66c87f77c64f04e10ef9c9) --- tests/ReadabilityTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/ReadabilityTest.php b/tests/ReadabilityTest.php index b190a8e..42f952a 100644 --- a/tests/ReadabilityTest.php +++ b/tests/ReadabilityTest.php @@ -19,7 +19,7 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase $readability = $this->getReadability(''); $this->assertNull($readability->url); - $this->assertInstanceOf('DomDocument', $readability->dom); + $this->assertInstanceOf(\DOMDocument::class, $readability->dom); } public function testConstructHtml5Parser() @@ -27,7 +27,7 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase $readability = $this->getReadability('', 'http://0.0.0.0', 'html5lib'); $this->assertSame('http://0.0.0.0', $readability->url); - $this->assertInstanceOf('DomDocument', $readability->dom); + $this->assertInstanceOf(\DOMDocument::class, $readability->dom); $this->assertSame('', $readability->original_html); } @@ -39,7 +39,7 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase $readability = $this->getReadability('', 'http://0.0.0.0'); $this->assertSame('http://0.0.0.0', $readability->url); - $this->assertInstanceOf('DomDocument', $readability->dom); + $this->assertInstanceOf(\DOMDocument::class, $readability->dom); $this->assertSame('', $readability->original_html); $this->assertTrue($readability->tidied); } @@ -52,7 +52,7 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase $this->assertSame('', $readability->original_html); $this->assertFalse($readability->tidied); - $this->assertInstanceOf('DomDocument', $readability->dom); + $this->assertInstanceOf(\DOMDocument::class, $readability->dom); } public function testConstructSimpleWithoutTidy() @@ -60,7 +60,7 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase $readability = $this->getReadability('', 'http://0.0.0.0', 'libxml', false); $this->assertSame('http://0.0.0.0', $readability->url); - $this->assertInstanceOf('DomDocument', $readability->dom); + $this->assertInstanceOf(\DOMDocument::class, $readability->dom); $this->assertSame('', $readability->original_html); $this->assertFalse($readability->tidied); }