wip flattening
This commit is contained in:
parent
74f151df07
commit
d83a324eb0
5 changed files with 64 additions and 23 deletions
18
tests/Flattening/FlatteningTest.php
Normal file
18
tests/Flattening/FlatteningTest.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Flattening;
|
||||
|
||||
use Icefox\DTO\Log;
|
||||
use Icefox\DTO\Support\RuleFactory;
|
||||
use Tests\Flattening\Classes\BasicRoot;
|
||||
|
||||
describe('flattens required parameters', function () {
|
||||
it('generates correct rules', function () {
|
||||
|
||||
$rules = (new RuleFactory(new Log()))->make(BasicRoot::class);
|
||||
expect($rules)->toMatchArray([
|
||||
'text' => ['required'],
|
||||
'value' => ['required', 'numeric'],
|
||||
]);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue