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_fo..., 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@wikimedia.se Telefon/*Phone*: (+46) 0707 - 92 03 84
Try passing
--wiki wiki
As a command line argument to the script. (Assuming wiki is the db name. Otherwise pass --wiki dbname_here )
-- bawolff
On Wednesday, October 25, 2017, Sebastian Berlin < sebastian.berlin@wikimedia.se> wrote:
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_fo... ,
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@wikimedia.se Telefon/*Phone*: (+46) 0707 - 92 03 84 _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
That did it. Thanks a lot.
I added a line about this to the Wiki-page.
Best,
*Sebastian Berlin* Utvecklare/*Developer* Wikimedia Sverige (WMSE)
E-post/*E-Mail*: sebastian.berlin@wikimedia.se Telefon/*Phone*: (+46) 0707 - 92 03 84
On 25 October 2017 at 12:39, Brian Wolff bawolff@gmail.com wrote:
Try passing
--wiki wiki
As a command line argument to the script. (Assuming wiki is the db name. Otherwise pass --wiki dbname_here )
-- bawolff
On Wednesday, October 25, 2017, Sebastian Berlin < sebastian.berlin@wikimedia.se> wrote:
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_for_extensions#Run_your_tests ,
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@wikimedia.se Telefon/*Phone*: (+46) 0707 - 92 03 84 _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org