From 0f9f97155693bddffe91afc02ece437d58499a05 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 19 Jun 2026 05:21:30 +0200 Subject: [PATCH] tests: Use class constants instead of strings Fixed using `composer rector` and then `composer fix`: https://getrector.com/rule-detail/string-class-name-to-class-constant-rector --- tests/ReadabilityTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/ReadabilityTest.php b/tests/ReadabilityTest.php index e93efb0..2971f99 100644 --- a/tests/ReadabilityTest.php +++ b/tests/ReadabilityTest.php @@ -538,8 +538,8 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase $res = $readability->init(); $this->assertTrue($res); - $this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent()); - $this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle()); + $this->assertInstanceOf(JSLikeHTMLElement::class, $readability->getContent()); + $this->assertInstanceOf(JSLikeHTMLElement::class, $readability->getTitle()); $this->assertSame('Tõde ja õigus I', $readability->getTitle()->getInnerHtml()); $this->assertStringContainsString('Päike lähenes', $readability->getContent()->getInnerHtml()); } @@ -584,7 +584,7 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase $this->assertTrue($res); $this->assertInstanceOf(\DOMDocument::class, $readability->dom); $this->assertSame($lang, $readability->dom->documentElement->getAttribute('lang')); - $this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent()); + $this->assertInstanceOf(JSLikeHTMLElement::class, $readability->getContent()); $this->assertStringContainsString('êtres', $readability->getContent()->getInnerHtml()); }