spatie / laravel-pdf

Create PDF files in Laravel apps
https://spatie.be/docs/laravel-pdf
MIT License
715 stars 54 forks source link

[Bug]: Example test failing - undefined method #39

Closed elijahworkz closed 9 months ago

elijahworkz commented 9 months ago

What happened?

when running an example of the test provided in the description I get an error that method doesn't exist: Call to undefined method Spatie\LaravelPdf\FakePdfBuilder::assertDownloaded()

How to reproduce the bug

Copy the test provided in documentation. (I do have a controller and a page that renders html)

Package Version

2.0.0

PHP Version

8.2.14

Laravel Version

10.10

Which operating systems does with happen with?

macOS

Notes

No response

freekmurze commented 9 months ago

This is the correct way to do this

https://github.com/spatie/laravel-pdf/blob/a61514ca413dade3d5aa01add77712fb3ced078d/tests/FakePdfTest.php#L122-L124

elijahworkz commented 9 months ago

@freekmurze thanks! But perhaps the descriptions in your repo and on your site should be updated?

https://spatie.be/docs/laravel-pdf/v1/introduction