0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-19 17:42:14 +02:00

PHPMailerTest::testGivenIdnAddress...(): set test requirements

As per the discussion in 3092, this commit removes the `fakefunctions.php` file and adds explicit requirements for the `PHPMailerTest::testGivenIdnAddress_addAddress_returns_true()` test method.

Closes 3092
This commit is contained in:
jrfnl 2024-09-12 09:11:34 +02:00
parent b554b1e6ca
commit 6028776a63
No known key found for this signature in database
GPG Key ID: 88BCD0973A23BCC6
2 changed files with 4 additions and 20 deletions

View File

@ -1258,13 +1258,12 @@ EOT;
$this->Mail->smtpClose();
}
/**
* @requires extension mbstring
* @requires function idn_to_ascii
*/
public function testGivenIdnAddress_addAddress_returns_true()
{
if (file_exists(\PHPMAILER_INCLUDE_DIR . '/test/fakefunctions.php') === false) {
$this->markTestSkipped('/test/fakefunctions.php file not found');
}
include \PHPMAILER_INCLUDE_DIR . '/test/fakefunctions.php';
$this->assertTrue($this->Mail->addAddress('test@françois.ch'));
}

View File

@ -1,15 +0,0 @@
<?php
if (!function_exists('idn_to_ascii')) {
function idn_to_ascii()
{
return true;
}
}
if (!function_exists('mb_convert_encoding')) {
function mb_convert_encoding()
{
return true;
}
}