22 lines
701 B
PHP
22 lines
701 B
PHP
<?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']);
|
|
}
|
|
}
|