[Web][Tests] Add PHPUnit setup and imapsync module tests

This commit is contained in:
FreddleSpl0it committed 2026-10-22 10:07:52 +02:00
1 parent b2a152fe45
commit e756b7857e
18 files changed
+3948 -1

No files matched your search

@@ -0,0 +1,22 @@
<?php
// Stand-ins for the legacy ACL functions of data/web/inc/functions.inc.php, used by ContextTest only:
// they record the call and answer from a fixed table.
use Mailcow\Tests\Support\LegacyAclCalls;
if (!function_exists('hasMailboxObjectAccess')) {
function hasMailboxObjectAccess($username, $role, $object)
{
LegacyAclCalls::$calls[] = ['mailbox', $username, $role, $object];
return $object === 'allowed@example.org';
}
}
if (!function_exists('hasDomainAccess')) {
function hasDomainAccess($username, $role, $domain)
{
LegacyAclCalls::$calls[] = ['domain', $username, $role, $domain];
return $domain === 'example.org';
}
}