Skip to content

Commit

Permalink
Merge pull request #19 from pinkary-project/feature/arch-test
Browse files Browse the repository at this point in the history
Add initial arch testing
  • Loading branch information
nunomaduro authored Mar 21, 2024
2 parents 9db57e0 + 1223c06 commit dffb247
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="Arch">
<file>tests/Arch.php</file>
</testsuite>
</testsuites>
<source>
<include>
Expand Down
16 changes: 16 additions & 0 deletions tests/Arch.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

arch('globals')
->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',
]);

0 comments on commit dffb247

Please sign in to comment.