NovaUnit is a unit-testing package for Laravel Nova, built using PHPUnit. NovaUnit provides you with assertions for Nova Actions, Lenses and Resources, so you can create great administration panels with confidence.
You can install the package in your Laravel Project via composer:
composer require --dev joshgaber/novaunit
- PHP 7.3 or higher
- Laravel 6.x - 10.x
- Laravel Nova 2.x - 4.x
- PHPUnit 8.5.x - 10.x
To access the test classes, import and use the base test traits:
class ClearLogsTest extends TestCase {
use NovaActionTest;
}
Once you've created the mock with the initial test class, you can begin testing different aspect of the component:
$this->novaAction(ClearLogs::class)
->assertHasField('since_date');
For a list of available methods, see the full docs site.
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email joshgaber@gmail.com instead of using the issue tracker.
- Josh Gaber (Creator & Maintainer)
The MIT License (MIT). Please see License File for more information.
This package was generated using the Laravel Package Boilerplate.