assertIsString($config); $this->assertStringContainsString("'allowed_extensions'", $config); $this->assertStringContainsString("'php'", $config); $this->assertStringContainsString("'js'", $config); $this->assertStringContainsString("'rpg'", $config); $this->assertStringContainsString("'rpgle'", $config); } /** * All Helpdesk upload entry points should use the shared source-safe rules. */ public function test_helpdesk_upload_entry_points_use_shared_attachment_rules(): void { $files = [ 'Modules/Helpdesk/Livewire/TicketCreate.php', 'Modules/Helpdesk/Livewire/TicketEdit.php', 'Modules/Helpdesk/Livewire/TicketShow.php', 'Modules/Helpdesk/Http/Controllers/TicketStoreController.php', 'Modules/Helpdesk/Http/Controllers/TicketCommentStoreController.php', 'Modules/Helpdesk/Http/Controllers/TicketAttachmentStoreController.php', ]; foreach ($files as $file) { $contents = file_get_contents(base_path($file)); $this->assertIsString($contents); $this->assertStringContainsString('extensions:', $contents, $file); $this->assertStringNotContainsString('mimes:', $contents, $file); $this->assertStringNotContainsString('AttachmentValidation', $contents, $file); } } }