orchestral / testbench

Laravel Testing Helper for Packages Development
https://packages.tools/testbench
MIT License
2.1k stars 136 forks source link

Support view() / blade() test helpers #410

Closed gbalduzzi closed 2 months ago

gbalduzzi commented 2 months ago

I'm building a Package for publishing custom blade components and I'm writing some tests.

However, this great package currently doesn't support the utils for testing views such as view() and blade().

It's my understanding that the testbench TestCase is missing the InteractsWithViews concern.

I see that some other packages embed the concern directly in their package.

I can submit a PR adding the InteractsWithViews concern to this library directly: let me know if there is interest or, on the contrary, there is some incompatibility that I don't notice

crynobone commented 2 months ago

Feel free to submit a PR to the Testbench Core repository.

However, this has already been documented in our documentation: https://packages.tools/testbench/the-basic.html#testing-blade-components