I'm having trouble running PHPUnit for the extension I'm developing
(Wikispeech), in Vagrant. I followed the instructions on
https://www.mediawiki.org/wiki/Manual:PHP_unit_testing/Writing_unit_tests_f…,
i.e. `tests/phpunit/phpunit.php extensions/Wikispeech/tests`, and got the
error:
Fatal error: Uncaught exception
'Wikimedia\Rdbms\DBConnectionError' with
message 'Cannot access the database: Unknown database
'extensions/Wikispeech/tests/phpunit/ApiWikispeechTest.php' (127.0.0.1)' in
/vagrant/mediawiki/includes/libs/rdbms/database/Database.php:800
For full log, see
https://phabricator.wikimedia.org/P6176.
Does anyone know what's causing this?
Previously I've run the tests with `phpunit extensions/Wikispeech/tests`
which I realize isn't the correct way, after reading the Wiki-page again.
However, this didn't work after I reinstalled Vagrant (due to various other
problems).
All the best,
*Sebastian Berlin*
Utvecklare/*Developer*
Wikimedia Sverige (WMSE)
E-post/*E-Mail*: sebastian.berlin(a)wikimedia.se
Telefon/*Phone*: (+46) 0707 - 92 03 84