Problem/Motivation

The automated testing configuration for the 8.x-1.x branch of this project seems to have been disabled because it was configured to use Drupal 8.9.x. The status currently reads disabled, testing configuration no longer available

Additionally the default testing that is selected for new issue patches uses Drupal 9.3.x and some of the exosting automated tests are failing on Drupal core 9.3.x for every patch. Example failures:

exception: [Other] Line 0 of sites/default/files/simpletest/phpunit-2.xml:
PHPUnit Test failed to complete; Error: PHPUnit 8.5.21 by Sebastian Bergmann and contributors.

Testing Drupal\Tests\smtp\Unit\Plugin\Mail\SMTPMailSystemTest
...........EEEE                                                   15 / 15 (100%)

Time: 362 ms, Memory: 8.00 MB

There were 4 errors:

1) Drupal\Tests\smtp\Unit\Plugin\Mail\SMTPMailSystemTest::testMailValidator with data set "Without umlauts, Drupal mail validator, no exception" ('test@drupal.org', 'PhpUnit Localhost ', Drupal\Component\Utility\EmailValidator Object (...), null)
TypeError: Argument 1 passed to Egulias\EmailValidator\EmailValidator::isValid() must be of the type string, null given, called in /var/www/html/core/lib/Drupal/Component/Utility/EmailValidator.php on line 30

/var/www/html/vendor/egulias/email-validator/src/EmailValidator.php:35
/var/www/html/core/lib/Drupal/Component/Utility/EmailValidator.php:30
/var/www/html/modules/contrib/smtp/src/Plugin/Mail/SMTPMailSystem.php:258
/var/www/html/modules/contrib/smtp/tests/src/Unit/Plugin/Mail/SMTPMailSystemTest.php:273
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:703
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:627
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:627
/var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:656
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:235
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:194

2) Drupal\Tests\smtp\Unit\Plugin\Mail\SMTPMailSystemTest::testMailValidator with data set "With umlauts in local part, Drupal mail validator, no exception" ('testmüller@drupal.org', 'PhpUnit Localhost ', Drupal\Component\Utility\EmailValidator Object (...), null)
TypeError: Argument 1 passed to Egulias\EmailValidator\EmailValidator::isValid() must be of the type string, null given, called in /var/www/html/core/lib/Drupal/Component/Utility/EmailValidator.php on line 30

/var/www/html/vendor/egulias/email-validator/src/EmailValidator.php:35
/var/www/html/core/lib/Drupal/Component/Utility/EmailValidator.php:30
/var/www/html/modules/contrib/smtp/src/Plugin/Mail/SMTPMailSystem.php:258
/var/www/html/modules/contrib/smtp/tests/src/Unit/Plugin/Mail/SMTPMailSystemTest.php:273
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:703
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:627
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:627
/var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:656
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:235
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:194

3) Drupal\Tests\smtp\Unit\Plugin\Mail\SMTPMailSystemTest::testMailValidator with data set "With umlauts in domain part, Drupal mail validator, no exception" ('test@müllertest.de', 'PhpUnit Localhost ', Drupal\Component\Utility\EmailValidator Object (...), null)
TypeError: Argument 1 passed to Egulias\EmailValidator\EmailValidator::isValid() must be of the type string, null given, called in /var/www/html/core/lib/Drupal/Component/Utility/EmailValidator.php on line 30

/var/www/html/vendor/egulias/email-validator/src/EmailValidator.php:35
/var/www/html/core/lib/Drupal/Component/Utility/EmailValidator.php:30
/var/www/html/modules/contrib/smtp/src/Plugin/Mail/SMTPMailSystem.php:258
/var/www/html/modules/contrib/smtp/tests/src/Unit/Plugin/Mail/SMTPMailSystemTest.php:273
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:703
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:627
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:627
/var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:656
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:235
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:194

4) Drupal\Tests\smtp\Unit\Plugin\Mail\SMTPMailSystemTest::testMailValidator with data set "Without top-level domain in domain part, Drupal mail validator, no exception" ('test@drupal', 'PhpUnit Localhost ', Drupal\Component\Utility\EmailValidator Object (...), null)
TypeError: Argument 1 passed to Egulias\EmailValidator\EmailValidator::isValid() must be of the type string, null given, called in /var/www/html/core/lib/Drupal/Component/Utility/EmailValidator.php on line 30

/var/www/html/vendor/egulias/email-validator/src/EmailValidator.php:35
/var/www/html/core/lib/Drupal/Component/Utility/EmailValidator.php:30
/var/www/html/modules/contrib/smtp/src/Plugin/Mail/SMTPMailSystem.php:258
/var/www/html/modules/contrib/smtp/tests/src/Unit/Plugin/Mail/SMTPMailSystemTest.php:273
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:703
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:627
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:627
/var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:656
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:235
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:194

ERRORS!
Tests: 15, Assertions: 26, Errors: 4.

Steps to reproduce

  • Add a patch to any issue using the default automated testing option (Drupal 9.3.x)
  • See the same failures as below

Proposed resolution

  • Enable periodic testing (and commit testing) with Drupal 9.3.x
  • Fix (or temporarily disable) broken tests.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

joegraduate created an issue. See original summary.

joegraduate’s picture

Issue summary: View changes
joegraduate’s picture

Issue summary: View changes
whthat’s picture

Saw this error with password reset but on a live site not in a unit test. We are required to use the SMTP Module but we essentially had no SMTP configuration like a null "from address". Make sure your test setup can send an email first, then try the password reset test again.

tr’s picture

Status: Active » Fixed

The broken test was fixed by #2925878: SMTPMailSystem does not respect $from and $from_name values, but not pushed until 10 Aug.
The test configurations were changed on 10 Aug.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.