View on GitHub

NovaUnit

Unit testing suite for Laravel Nova, built to extend PHPUnit

Resources

Testing Resources

To create the testing object for a Nova Resource, add the NovaResourceTest trait to your class, and invoke the test method.

class TestClass extends TestCase
{
    use NovaResourceTest;

    public function testNovaResource()
    {
        $resource = $this->novaResource(UserResource::class);
    }
}

The following assertions can be run on the Nova Resource: