quotevelocity / novaunit
Unit testing suite for Laravel Nova, built to extend PHPUnit
Installs: 5 068
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^8.0|^8.1|^8.2
- ext-mbstring: *
- cakephp/chronos: >=2.0.0
- illuminate/support: ^8.83.4|^9.3.1|^10.0|^11.0
- laravel/nova: ^4.0
- phpunit/phpunit: ^9.0|^10.0|^11.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- orchestra/testbench: ^6.0|^8.0|^9.0
This package is not auto-updated.
Last update: 2024-11-06 21:10:55 UTC
README
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.
NovaUnit is a fork of the brilliant original package by Josh Gaber which has been updated to support the latest versions of Laravel and Nova.
Installation
You can install the package in your Laravel Project via composer:
composer require --dev quotevelocity/novaunit
Requirements
- PHP 8.0 or higher
- Laravel 9.x - 11.x
- Laravel Nova 4.x or higher
- PHPUnit 9.x - 11.x
Note: For older projects (Laravel < 9, Nova 2 or 3) please see the legacy project: joshgaber/novaunit
instead.
Usage
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.
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email rob at quotevelocity
.com instead of using the issue tracker.
Maintained By
- Robert Marney (Maintainer)
Created By
- Josh Gaber (Creator)
Contributors
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.