diff --git a/test/PHPMailer/ValidateAddressCustomValidatorTest.php b/test/PHPMailer/ValidateAddressCustomValidatorTest.php index bfec3e11..1e729a3a 100644 --- a/test/PHPMailer/ValidateAddressCustomValidatorTest.php +++ b/test/PHPMailer/ValidateAddressCustomValidatorTest.php @@ -87,6 +87,8 @@ final class ValidateAddressCustomValidatorTest extends TestCase */ public function testRejectCallables($callback, $message) { + require_once \PHPMAILER_INCLUDE_DIR . '/test/validators.php'; + self::assertTrue(PHPMailer::validateAddress('test@example.com', $callback), $message); } diff --git a/test/TestCase.php b/test/TestCase.php index 44bb5c2b..00161a1b 100644 --- a/test/TestCase.php +++ b/test/TestCase.php @@ -62,8 +62,6 @@ abstract class TestCase extends PolyfillTestCase */ public static function set_up_before_class() { - require_once __DIR__ . '/validators.php'; - if (defined('PHPMAILER_INCLUDE_DIR') === false) { /* * Set up default include path.