Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

number6's avatar

Running Tests on Nova Resources

The follow gist looks pretty straightforward and I plugged it into my tests.

https://gist.github.com/jhm-ciberman/b6063c31a680b75fca55f7dcb37f66ae

However Nova::$resources is always an empty collection so the test always fails. I try and populate $resources with

Nova::resourcesIn(app_path(Nova::path()));

But it says Resources already loaded, even though the collection is empty. How can you get a list of resources?

I'm using Laravel 9 & Nova 3.31

0 likes
0 replies

Please or to participate in this conversation.