yab / laratest
The easiest way to generate tests from your existing files and routes.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Requires
- php: >=5.6.4
- illuminate/support: 5.*
Requires (Dev)
- mikey179/vfsstream: ^1.6
- mockery/mockery: ^0.9.4
- orchestra/testbench: ^3.3
This package is auto-updated.
Last update: 2024-10-02 19:24:37 UTC
README
LaraTest - A elegantly simple way to generate tests for Laravel.
Writing tests can be a joy, at least writing ones that work can be. TDD is obviously ideal but sometimes it just ends up being last on the client's priority list. With LaraTest you can generate Unit tests from existing Classes or Integration tests from Routes.
Author(s):
- Matt Lantz (@mattylantz, matt at yabhq dot com)
Requirements
- PHP 5.6+
- Laravel 5.3+
Composer
Start a new Laravel project:
composer create-project laravel/laravel your-project-name
Then run the following to add LaraTest
composer require yab/laratest
Providers
Yab\LaraTest\LaraTestProvider::class
Use Cases
Here are some basic use cases.
Generate a unit test from a class:
php artisan laratest:unit path/to/class/to/test.php
Generate an integration test from a route:
php artisan laratest:route users
License
LaraTest is open-sourced software licensed under the MIT license
Bug Reporting and Feature Requests
Please add as many details as possible regarding submission of issues and feature requests
Disclaimer
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.