diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ac8970539..e0be34e2d 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -12,6 +12,11 @@ ./test/ + test/PHPMailer/AddAddressWithIDNTest.php + + + + ./test/PHPMailer/AddAddressWithIDNTest.php diff --git a/test/PHPMailer/AddAddressWithIDNTest.php b/test/PHPMailer/AddAddressWithIDNTest.php new file mode 100644 index 000000000..1dd06fef1 --- /dev/null +++ b/test/PHPMailer/AddAddressWithIDNTest.php @@ -0,0 +1,33 @@ + + * @author Andy Prevost + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2004 - 2009 Andy Prevost + * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License + */ + +namespace PHPMailer\Test\PHPMailer; + +use PHPMailer\PHPMailer\PHPMailer; +use PHPMailer\Test\TestCase; + +/** + * @covers \PHPMailer\PHPMailer\PHPMailer::addAddress + */ +final class AddAddressWithIDNTest extends TestCase +{ + 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')); + } +} diff --git a/test/PHPMailer/PHPMailerTest.php b/test/PHPMailer/PHPMailerTest.php index 0b82fe125..dcf9d8266 100644 --- a/test/PHPMailer/PHPMailerTest.php +++ b/test/PHPMailer/PHPMailerTest.php @@ -1258,16 +1258,6 @@ public function testSmtpConnect() $this->Mail->smtpClose(); } - 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')); - } - public function testErroneousAddress_addAddress_returns_false() { $this->assertFalse($this->Mail->addAddress('mehome.com'));