Laravel Finder Tests
![Software License][ico-license]
, (*1)
Laravel Finder Unit Tests., (*2)
Notice
The name of the class tests must match exactly with the name of the class
```php
//Class
ClassName.php, (*3)
//Test class
ClassNameTest.php, (*4)
the name of the test methods and the name of the class methods must match
```php
//In class
public function methodName()
{
...
}
//In test class
public function testMethodName()
{
...
}
Install
Install package:, (*5)
``` bash
$ composer require wdda/laravel-finder-tests --dev, (*6)
Open your config/app.php and add the following to the providers array:
``` php
WDDA\LaravelFinderTests\FinderTestsProvider::class,
Run the command below to publish the package config file config/finder-tests.php:, (*7)
``` php
php artisan vendor:publish --tag=finder-tests, (*8)
## Usage
``` php
php artisan finder-tests
or for option only not found
``` php
php artisan finder-tests --limit=1, (*9)
axample all settings for config finder-tests.php
```php
return [
'directory' => [
[
'rootPath' => app_path(),
'classes' => [ //required
'dir' => 'Modules/Models', //required
'methodsExclude' => [
'__construct'
],
'classesExclude' => [
'App\Modules\Models\Wiki'
]
],
'tests' => [ //required
'dir' => 'Modules/Tests/Unit', //required
'methodsExclude' => [
'test'
],
'classesExclude' => [
'App\Modules\Tests\Wiki'
]
]
],
[
//Other directory...
]
]
];
Testing
bash
$ phpunit
, (*10)
Security
If you discover any security related issues, please email dima@wdda.pro instead of using the issue tracker., (*11)
Credits
License
The MIT License (MIT). Please see License File for more information., (*12)