isFile() && $file->getExtension() === 'php') { $files[] = $file->getPathname(); } } return $files; } public function test_school_core_finance_does_not_depend_on_islamic_sunday_school(): void { foreach ($this->phpFiles(__DIR__ . '/../../app/Domain/SchoolCore/Finance') as $file) { $this->assertStringNotContainsString('App\\Domain\\IslamicSundaySchool', file_get_contents($file), $file); } } public function test_school_core_finance_does_not_use_request_or_auth_helpers(): void { foreach ($this->phpFiles(__DIR__ . '/../../app/Domain/SchoolCore/Finance') as $file) { $contents=file_get_contents($file); $this->assertStringNotContainsString('Illuminate\\Http\\Request', $contents, $file); $this->assertStringNotContainsString('auth()', $contents, $file); $this->assertStringNotContainsString('request()', $contents, $file); } } public function test_school_core_finance_avoids_float_casts(): void { foreach ($this->phpFiles(__DIR__ . '/../../app/Domain/SchoolCore/Finance') as $file) { $this->assertStringNotContainsString('(float)', file_get_contents($file), $file); } } public function test_no_active_filename_only_payment_file_route_in_phase3_routes(): void { $routes = file_get_contents(__DIR__ . '/../../routes/finance_phase3.php'); $this->assertStringNotContainsString("Route::get('payments/files/{filename}'", $routes); } }