diff --git a/tests/PdfTest.php b/tests/PdfTest.php index 003888a..b0193c2 100644 --- a/tests/PdfTest.php +++ b/tests/PdfTest.php @@ -157,3 +157,22 @@ expect($this->targetPath)->toContainText('hello'); }); + +it('can save as png in local and disk', function () { + Storage::fake('local'); + + $firstPath = getTempPath('first.png'); + Pdf::view('test') + ->save($firstPath); + + expect(mime_content_type($firstPath)) + ->toBe('image/png'); + + Pdf::view('test') + ->disk('local') + ->save('second.png'); + + expect(Storage::disk('local') + ->mimeType('second.png')) + ->toBe('image/png'); +});