Downloads
Stars
Version
composer require gregdmat/laravel-test-utilities
php artisan ltu:intall
This feature provides several scenarios for a data type.
Modify dataCases config to remove some data case.
Types of data available.
Basic usage:
$teste = new DataCases();
$teste->get([
'attribute' => 'type',
'name' => 'string'
]);
Avaible methods
$teste->get([
'attribute' => 'type',
'name' => 'string'
]);
$teste->make(
[
'attribute' => 'type',
'name' => 'string'
],
Model::class
);
$teste->create(
[
'attribute' => 'type',
'name' => 'string'
],
Model::class
);
Options
When instantiating the DataCases class, it is possible to pass an array of options to the constructor.
$teste = new DataCases([
'integer' => [
'except' => ['negative', 'positive'],
'positive.min' => 1,
'positive.max' => 3,
]
]);
- except (array of name cases);
- small.size;
- normal.size;
- long.size;
- negative.min;
- negative.max;
- positive.min
- positive.max