Last modified: 2014-08-17 23:27:33 UTC
When I run command: > vagrant run-tests I get error message: No MWMultiVersion instance initialized! MWScript.php wrapper not used? I tried to run phpunit test inside vagrant: > vagrant ssh $ cd /vagrant/mediawiki $ php tests/phpunit/phpunit.php No MWMultiVersion instance initialized! MWScript.php wrapper not used? How can I run the phpunit tests?
I broke this with the changes I introduced in I26b3705 ("Rethink multiwiki support"). Using `mwscript tests/phpunit/phpunit.php` will initialize MWMultiVersion correctly, but this leads to another error: Class 'tests/phpunit/phpunit' could not be found in '/vagrant/mediawiki/tests/phpunit/phpunit.php'. This seems to be an issue with the way that mwscript interacts with the tests/phpunit/phpunit.php script. The more I look at this the more I think that the LocalSettings.php bootstrapping system should default to configuring for the default wiki in the event that mwscript or a similar mechanism hasn't been used to change the wiki.
Change 154472 had a related patch set uploaded by BryanDavis: Bootstrap MWMultiVersion for default wiki if unset https://gerrit.wikimedia.org/r/154472
Change 154472 merged by jenkins-bot: Bootstrap MWMultiVersion for default wiki if unset https://gerrit.wikimedia.org/r/154472
Both `vagrant run-tests` and direct use of `php tests/phpunit/phpunit.php` work for me now with the latest version of MediaWiki-Vagrant checked out and `vagrant provision` run to update the state of the virtual machine.