when I run php artisan test
I got this message
PHPUnit requires the "dom" extension.
I already run composer install
Asked
Active
Viewed 432 times
-1

developer
- 39
- 1
- 6
-
see here : https://stackoverflow.com/questions/43408604/php7-install-ext-dom-issue – hmairi halim Jul 15 '22 at 14:17
-
I solved the problem now but I got another error : ` SQLSTATE[HY000] [2002] Connection refused (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE') ` when I run the command – developer Jul 15 '22 at 14:20
-
Make sure the database is up and running. Also make sure you're trying to connect to it using the correct hostname/ip and port. – M. Eriksson Jul 15 '22 at 14:30
-
I am using sqlite in memory to run laravel test – developer Jul 15 '22 at 14:33
1 Answers
-1
It is not a laravel issue. it's a PHP issue. you are missing extensions named php-xml and php-mbstring. install both extensions, restart the server and then error will be gone!

discussion
- 81
- 8