Last modified: 2014-10-13 18:48:42 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 T38065, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 36065 - Preferences tests are broken...
Preferences tests are broken...
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Unit tests (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-18 11:19 UTC by Sam Reed (reedy)
Modified: 2014-10-13 18:48 UTC (History)
4 users (show)

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


Attachments

Description Sam Reed (reedy) 2012-04-18 11:19:49 UTC
With:
$wgEnableEmail      = true;
$wgEnableUserEmail  = true; # UPO

reedy@ubuntu64-web-esxi:/var/www/wiki/w/tests/phpunit$ php phpunit.php includes/PreferencesTest.php
PHPUnit 3.6.10 by Sebastian Bergmann.

Configuration read from /var/www/wiki/w/tests/phpunit/suite.xml

F.F

Time: 2 seconds, Memory: 47.25Mb

There were 2 failures:

1) PreferencesTest::testEmailFieldsWhenUserHasNoEmail
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'mw-email-none'
+'mw-email-not-authenticated'

/var/www/wiki/w/tests/phpunit/includes/PreferencesTest.php:37
/var/www/wiki/w/tests/phpunit/MediaWikiTestCase.php:79
/var/www/wiki/w/tests/phpunit/MediaWikiPHPUnitCommand.php:45
/var/www/wiki/w/tests/phpunit/phpunit.php:62

2) PreferencesTest::testEmailFieldsWhenUserEmailIsAuthenticated
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'mw-email-authenticated'
+'mw-email-not-authenticated'

/var/www/wiki/w/tests/phpunit/includes/PreferencesTest.php:59
/var/www/wiki/w/tests/phpunit/MediaWikiTestCase.php:79
/var/www/wiki/w/tests/phpunit/MediaWikiPHPUnitCommand.php:45
/var/www/wiki/w/tests/phpunit/phpunit.php:62

FAILURES!
Tests: 3, Assertions: 6, Failures: 2.


With:
$wgEnableEmail      = false;
$wgEnableUserEmail  = false; # UPO


reedy@ubuntu64-web-esxi:/var/www/wiki/w/tests/phpunit$ php phpunit.php includes/PreferencesTest.php
PHPUnit 3.6.10 by Sebastian Bergmann.

Configuration read from /var/www/wiki/w/tests/phpunit/suite.xml

EEE

Time: 2 seconds, Memory: 47.25Mb

There were 3 errors:

1) PreferencesTest::testEmailFieldsWhenUserHasNoEmail
Undefined index: emailaddress

/var/www/wiki/w/tests/phpunit/includes/PreferencesTest.php:35
/var/www/wiki/w/tests/phpunit/MediaWikiTestCase.php:79
/var/www/wiki/w/tests/phpunit/MediaWikiPHPUnitCommand.php:45
/var/www/wiki/w/tests/phpunit/phpunit.php:62

2) PreferencesTest::testEmailFieldsWhenUserEmailNotAuthenticated
Undefined index: emailaddress

/var/www/wiki/w/tests/phpunit/includes/PreferencesTest.php:46
/var/www/wiki/w/tests/phpunit/MediaWikiTestCase.php:79
/var/www/wiki/w/tests/phpunit/MediaWikiPHPUnitCommand.php:45
/var/www/wiki/w/tests/phpunit/phpunit.php:62

3) PreferencesTest::testEmailFieldsWhenUserEmailIsAuthenticated
Undefined index: emailaddress

/var/www/wiki/w/tests/phpunit/includes/PreferencesTest.php:57
/var/www/wiki/w/tests/phpunit/MediaWikiTestCase.php:79
/var/www/wiki/w/tests/phpunit/MediaWikiPHPUnitCommand.php:45
/var/www/wiki/w/tests/phpunit/phpunit.php:62

FAILURES!
Tests: 3, Assertions: 0, Errors: 3.
Comment 1 Krinkle 2012-04-22 15:41:12 UTC
Hm.. on https://integration.mediawiki.org/ci/? everything is still shining bright in green. Why are these tests disabled there?

DefaultSettings.php:
> [..]
> $wgEnableEmail = true;
> 
> [..]
> $wgEnableUserEmail = true;
>
Comment 2 Antoine "hashar" Musso (WMF) 2012-05-23 01:36:07 UTC
I can't reproduce the issue.

They do work on WMF Jenkins installation :
https://integration.mediawiki.org/ci/job/MediaWiki-Tests-Databaseless/1568/testReport/(root)/PreferencesTest/

All Tests
Test name   	Duration   	Status   
testEmailFieldsWhenUserEmailIsAuthenticated 	10 ms	Passed
testEmailFieldsWhenUserEmailNotAuthenticated 	10 ms	Passed
testEmailFieldsWhenUserHasNoEmail 	14 ms	Passed

Sounds like a local installation issue. I am thus closing it as Works for me, feel free to reopen the bug whenever you get more details :-D
Comment 3 Sam Reed (reedy) 2012-05-23 05:05:16 UTC
I'm still getting the same failures

reedy@ubuntu64-web-esxi:/var/www/wiki/w/tests/phpunit$ php phpunit.php includes/PreferencesTest.php
PHPUnit 3.6.10 by Sebastian Bergmann.

Configuration read from /var/www/wiki/mediawiki/core/tests/phpunit/suite.xml

F.F

Time: 5 seconds, Memory: 47.50Mb

There were 2 failures:

1) PreferencesTest::testEmailFieldsWhenUserHasNoEmail
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'mw-email-none'
+'mw-email-not-authenticated'

/var/www/wiki/mediawiki/core/tests/phpunit/includes/PreferencesTest.php:41
/var/www/wiki/mediawiki/core/tests/phpunit/MediaWikiTestCase.php:79
/var/www/wiki/mediawiki/core/tests/phpunit/MediaWikiPHPUnitCommand.php:45
/var/www/wiki/mediawiki/core/tests/phpunit/phpunit.php:103

2) PreferencesTest::testEmailFieldsWhenUserEmailIsAuthenticated
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'mw-email-authenticated'
+'mw-email-not-authenticated'

/var/www/wiki/mediawiki/core/tests/phpunit/includes/PreferencesTest.php:63
/var/www/wiki/mediawiki/core/tests/phpunit/MediaWikiTestCase.php:79
/var/www/wiki/mediawiki/core/tests/phpunit/MediaWikiPHPUnitCommand.php:45
/var/www/wiki/mediawiki/core/tests/phpunit/phpunit.php:103

FAILURES!
Tests: 3, Assertions: 6, Failures: 2.

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


Navigation
Links