Last modified: 2014-08-17 23:27:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71520, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69520 - I get error message "No MWMultiVersion instance initialized!" when run phpunit tests
I get error message "No MWMultiVersion instance initialized!" when run phpuni...
Status: RESOLVED FIXED
Product: MediaWiki-Vagrant
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: High normal
: ---
Assigned To: Bryan Davis
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-14 05:26 UTC by Pavel (pastakhov)
Modified: 2014-08-17 23:27 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Pavel (pastakhov) 2014-08-14 05:26:41 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?
Comment 1 Bryan Davis 2014-08-17 15:59:58 UTC
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.
Comment 2 Gerrit Notification Bot 2014-08-17 16:19:46 UTC
Change 154472 had a related patch set uploaded by BryanDavis:
Bootstrap MWMultiVersion for default wiki if unset

https://gerrit.wikimedia.org/r/154472
Comment 3 Gerrit Notification Bot 2014-08-17 20:59:56 UTC
Change 154472 merged by jenkins-bot:
Bootstrap MWMultiVersion for default wiki if unset

https://gerrit.wikimedia.org/r/154472
Comment 4 Bryan Davis 2014-08-17 23:27:33 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links