diff --git a/phpunit.xml b/phpunit.xml index c77f7e219..7191c44ad 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -14,6 +14,9 @@ tests/Unit + + tests/Arch.php + diff --git a/tests/Arch.php b/tests/Arch.php new file mode 100644 index 000000000..d87f5ab98 --- /dev/null +++ b/tests/Arch.php @@ -0,0 +1,16 @@ +expect(['dd', 'dump', 'ray', 'die', 'var_dump', 'sleep']) + ->not->toBeUsed(); + +arch('contracts') + ->expect('App\Contracts') + ->toBeInterfaces(); + +arch('http') + ->expect(['session', 'auth', 'request']) + ->toOnlyBeUsedIn([ + 'App\Http', + 'App\Livewire', + ]);