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.

0.1.2 2018-08-24 15:32 UTC

This package is auto-updated.

Last update: 2019-07-05 19:28:15 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):

Requirements

  1. PHP 5.6+
  2. 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.