3declare(strict_types=1);
10 throw new RuntimeException($message);
15require
$root .
'/dbx/modules/dbxContact/cfg/config.php';
19require
$root .
'/dbx/modules/dbxShop/cfg/config.php';
23 $root .
'/dbx/modules/dbxContact/include/dbxContactForm.class.php'
26 $root .
'/dbx/modules/dbxContact_admin/include/dbxContactAdmin.class.php'
29 $root .
'/dbx/modules/dbxShop/include/dbxShopService.class.php'
32 $root .
'/dbx/modules/dbxShop_admin/include/dbxShopAdmin.class.php'
35 $root .
'/dbx/modules/dbxSetup/include/dbxInstall.class.php'
37require_once
$root .
'/dbx/modules/dbxSetup/include/dbxInstall.class.php';
42 'Das Kontaktmodul muss den installationsbezogenen Absender in der lokalen Konfiguration erwarten.'
45 substr_count(
$contactForm,
"get_config('dbxContact', 'mail_from')") >= 1
46 && str_contains(
$contactForm,
'$this->mail_from_param()')
49 && str_contains(
$contactAdmin,
"get_config('dbxContact', 'mail_from')")
52 'Kontaktbenachrichtigung, Bestätigung oder Supportantwort umgehen mail_from.'
56 (
$shopConfig[
'mail_from'] ??
'') ===
'shop@dbxapp.de'
58 && (
$shopConfig[
'mail_from_name'] ??
'') ===
'dbxShop',
59 'Das Shopmodul besitzt nicht den erwarteten konfigurierbaren Standardabsender.'
65 && str_contains(
$shopService,
"\$extra['mail_profile'] = \$profile")
67 'Bestell- oder Widerrufsmails nutzen nicht durchgehend die Shop-Konfiguration.'
70 str_contains(
$shopAdmin,
"patch_local_config('dbxShop', \$mailLocal)")
71 && str_contains(
$shopAdmin,
"\$cfg['mail_from_name']")
72 && str_contains(
$shopAdmin,
"'mail_profile' => \$profile")
74 'Shop-Einstellungen oder Statusmails verwenden die lokale Absenderkonfiguration nicht vollständig.'
78 str_contains(
$installer,
"patch_local_config('dbxContact'")
79 && str_contains(
$installer,
"patch_local_config('dbxShop'")
80 && str_contains(
$installer,
"moduleSenderAddress('kontakt'")
81 && str_contains(
$installer,
"moduleSenderAddress('shop'")
83 && str_contains(
$installer,
'Shop-Nachrichten'),
84 'Der Installer konfiguriert die getrennten Modulabsender nicht vollständig.'
94 'Die Modulabsender werden nicht korrekt aus der globalen Absenderdomain abgeleitet.'
97echo
"OK configurable contact and shop mail senders\n";
if($resolved !==$expectedBase . 'files/test/') $config
module_mail_sender_assert(bool $condition, string $message)