This repository was archived by the owner on Dec 31, 2022. It is now read-only.
This repository was archived by the owner on Dec 31, 2022. It is now read-only.
Starting with Drupal 8.8, a database connection seems to be needed even for unit tests #2
Open
Description
In Start unit testing your Drupal and other PHP code today, October 16, 2019, Dcycle Blog I recommend using this to run tests as would the Drupal testbot. However starting with Drupal 8.8, I'm getting
Next PDOException: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php:416
Stack trace:
#0 /var/www/html/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(416): PDO->__construct('mysql:host=mysq...', 'root', '', Array)
which signals that a database is required even for unit tests. Until this issue is fixed this project is unusable. I recommend using CircleCI or a the technique in the above article which does not require the Drupal infrastructure.
Metadata
Metadata
Assignees
Labels
No labels