Files
crmPRO/tests/run.php
Jacek Pyziak 8f2e332069 Add unit tests for MailToTaskImporter attachment name normalization
- Implemented tests for various scenarios of attachment name normalization in MailToTaskImporter.
- Covered cases for technical names, named files, missing extensions, and content-based detection.
- Added tests for extracting names from MIME headers, including handling of Content-Description.
2026-02-18 23:30:11 +01:00

42 lines
929 B
PHP

<?php
require_once __DIR__ . '/Domain/Tasks/WorkTimeRepositoryTest.php';
require_once __DIR__ . '/Domain/Tasks/TaskAttachmentRepositoryTest.php';
require_once __DIR__ . '/Domain/Tasks/MailToTaskImporterTest.php';
require_once __DIR__ . '/Domain/Users/UserRepositoryTest.php';
require_once __DIR__ . '/Controllers/TasksControllerTest.php';
require_once __DIR__ . '/Controllers/UsersControllerTest.php';
$tests = [
'run_work_time_repository_tests',
'run_task_attachment_repository_tests',
'run_mail_to_task_importer_tests',
'run_user_repository_tests',
'run_tasks_controller_tests',
'run_users_controller_tests'
];
$failed = 0;
foreach ( $tests as $test )
{
try
{
$test();
echo "[OK] {$test}\n";
}
catch ( Throwable $e )
{
$failed++;
echo "[FAIL] {$test}: " . $e -> getMessage() . "\n";
}
}
if ( $failed )
{
echo "\nFailed: {$failed}\n";
exit( 1 );
}
echo "\nAll tests passed.\n";