Download the PHP package fadllabanie/laravel_unittest_generator without Composer
On this page you can find all versions of the php package fadllabanie/laravel_unittest_generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel_unittest_generator
Laravel Unit Test Generator
Supercharge your Laravel application's testing workflow with the laravel-generator package. This dynamic toolkit is your steadfast ally in creating robust unit tests with a touch of magic!
๐ Installation
Time to bring the laravel-generator into your project. Cast these spells with Composer:
Invoke the artisan to publish your configs:
Finally, migrate to shape your database's destiny:
๐ง Configuration
For the enchantment to work, your models must be imbued with these arcane properties:
Supported data types include: string, text, integer, float, date, image, datetime, boolean, password, email, token, belongsTo
๐ Usage
With the package now part of your repository, conjure unit tests for your models with a simple artisan command:
๐ NOTE:
- if use
belongsToyou should create relation model first and add getRelationData i model
๐๏ธ Options
Fine-tune your unit test generation with these options:
-for--factory: Summon a factory alongside your test for authentic data alchemy.-cor--controller: Invoke a controller test for double the sorcery.-ror--request: Enforce request validation tests for an impenetrable defense.
โจ Features
- Generate Factories: Automatically create factories based on your model's
$fillableand$fillableType. - CRUD Unit Tests: Conjure tests for Create, Read, Update, Delete, and relationships in one incantation.
- Action Pattern Controller: Organize your controller logic with discrete Action classes for clarity and reusability.
๐งช Generate Factories
The command transmutes your model properties into a factory class, paving the way for effortlessly creating test data:
๐ Generate Request Validation Tests
Strengthen your application's defenses by automating Request Validation tests:
๐ ๏ธ Generate Controller with Action Pattern
Embrace clean architecture by splitting controller logic into dedicated Action classes:
๐ก The Magic Behind the Trait
Our Error Logging Trait is your silent guardian, logging every misstep in the shadows so your app never falters.
Benefits
- Automated Error Tracking: Capture errors without lifting a wand.
- Easy Error Retrieval: Consult the database as your crystal ball for error insights.
- Streamlined Debugging: Navigate the maze of bugs with an enchanted map.
How to Generate
To arm your controllers with our trait, simply integrate it with:
๐ Known Issues
Ensure your models are correctly named and that your composer.json pathways are prophesied correctly. The $fillable and $fillableType must be declared to conjure tests properly.
๐ Contributing
Join our coven of contributors! Whether it's fixes, enhancements, or new features, your pull requests shall be greeted with a feast.
This README not only guides users through the mystical arts of unit test generation but also conveys the magical essence of the package. It aims to engage developers by blending technical instructions with thematic charm.