diff --git a/packages/page-scanner/tests/LinkedDocsScannerTest.php b/packages/page-scanner/tests/LinkedDocsScannerTest.php index d85af5ea5..1d05aac61 100644 --- a/packages/page-scanner/tests/LinkedDocsScannerTest.php +++ b/packages/page-scanner/tests/LinkedDocsScannerTest.php @@ -20,14 +20,15 @@ public function testIt() $errors = $linkedDocsScanner->scan($this->getPage(), file_get_contents(__DIR__.'/data/page.html')); - $this->assertSame( - [ - "https://localhost.dev/feed.xml unreacheable - Couldn't resolve host name", - "https://localhost.dev/ unreacheable - Couldn't resolve host name", - '#install target not found', - ], - \array_slice($errors, 0, 3) - ); + $knowedErrors = [ + "https://localhost.dev/feed.xml unreacheable - Couldn't resolve host name", + "https://localhost.dev/ unreacheable - Couldn't resolve host name", + '#install target not found', + ]; + + foreach ($knowedErrors as $error) { + $this->assertContains($error, $errors); + } } public function getPage(): PageInterface