Looking to hire Laravel developers? Try LaraJobs

laravel-finder-tests maintained by wdda

Description
This package uses reflection to find tests
Author
Last update
2018/10/23 13:36 (dev-master)
License
Downloads
1 318
Tags

Comments
comments powered by Disqus

Laravel Finder Tests

Software License Build Status

Laravel Finder Unit Tests.

Notice

The name of the class tests must match exactly with the name of the class

//Class
ClassName.php

//Test class
ClassNameTest.php

the name of the test methods and the name of the class methods must match

//In class
public function methodName() 
{
    ...
}
//In test class
public function testMethodName() 
{
    ...
}

Install

Install package:

$ composer require wdda/laravel-finder-tests --dev

Open your config/app.php and add the following to the providers array:

WDDA\LaravelFinderTests\FinderTestsProvider::class,

Run the command below to publish the package config file config/finder-tests.php:

php artisan vendor:publish --tag=finder-tests

Usage

php artisan finder-tests

or for option only not found

php artisan finder-tests --limit=1

axample all settings for config finder-tests.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

$ phpunit

Security

If you discover any security related issues, please email dima@wdda.pro instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.