🐛 Fix: retour JSON contact
This commit is contained in:
18
tests/phpmailer.test.php
Normal file
18
tests/phpmailer.test.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
function assertTrue($cond, $msg) {
|
||||
if (!$cond) {
|
||||
fwrite(STDERR, $msg . PHP_EOL);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
$composer = file_get_contents(__DIR__ . '/../composer.json');
|
||||
assertTrue(strpos($composer, 'phpmailer/phpmailer') !== false, 'missing phpmailer dependency');
|
||||
|
||||
$functions = file_get_contents(__DIR__ . '/../includes/functions.php');
|
||||
assertTrue(strpos($functions, 'PHPMailer') !== false, 'missing PHPMailer usage');
|
||||
|
||||
$config = file_get_contents(__DIR__ . '/../includes/config.php');
|
||||
assertTrue(strpos($config, 'MAIL_HOST') !== false, 'missing mail constants');
|
||||
|
||||
fwrite(STDOUT, "OK\n");
|
||||
Reference in New Issue
Block a user