update project
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Tests\Architecture;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Tests\Architecture\Concerns\ScansArchitecture;
|
||||
|
||||
final class ControllerBoundaryTest extends TestCase
|
||||
{
|
||||
use ScansArchitecture;
|
||||
|
||||
public function test_controllers_do_not_call_external_providers_directly(): void
|
||||
{
|
||||
$this->assertFilesDoNotContain('app/Http/Controllers', ['Mail::', 'Notification::send', 'Twilio', 'WhatsApp']);
|
||||
}
|
||||
|
||||
public function test_canonical_controllers_do_not_perform_obvious_domain_mutations(): void
|
||||
{
|
||||
$this->assertFilesDoNotContain('app/Http/Controllers/Api/V2', ['DB::table', 'Validator::make', 'Student::max', 'response()->download']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user