diff --git a/tests/PdfTest.php b/tests/PdfTest.php index 7232c70..5a57d86 100644 --- a/tests/PdfTest.php +++ b/tests/PdfTest.php @@ -99,7 +99,7 @@ expect($this->targetPath) ->toHaveDimensions(419, 595) ->toContainText('This is a test'); -}); +})->skipOnLinux(); it('can accept the orientation', function () { Pdf::view('test') diff --git a/tests/Pest.php b/tests/Pest.php index 230b087..d800483 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -68,10 +68,10 @@ function assertMatchesPdfSnapshot(string $pdfPath): void $expectedText = [$expectedText]; } - $actualText = strtolower(str_replace(' ', '', $actualText)); + $actualText = strtolower(preg_replace('/\s+/', '', $actualText)); foreach ($expectedText as $singleText) { - $singleText = strtolower(str_replace(' ', '', $singleText)); + $singleText = strtolower(preg_replace('/\s+/', '', $singleText)); expect(str_contains($actualText, $singleText))->toBeTrue( "Expected text `{$singleText}` not found in `{$actualText}`"