Alexandre Emsenhuber
a606e89c6b
Removed XmlTest::testNamespaceSelector(); it just breaks when $wgDevelopmentWarnings is set to true due to the fact that Xml::namespaceSelector() calls wfDeprecated().
2012-03-19 12:44:36 +00:00
Aaron Schulz
1bebf0c7ea
Fixed windows-related test failures (that string format doesn't work with \r\n line endings as the \r chars are left in the PHP string).
2012-02-02 18:42:02 +00:00
Krinkle
6ebbb369a6
[Xml::encodeJsVar] Change to match FormatJson::encode output
...
- Pure whitespace change
- In preparation to deprecate it in favor of FormatJson / json_encode
2012-01-30 19:40:20 +00:00
Chad Horohoe
e8da212569
Fixup r109698, add setter for $namespaceNames and use proper accessors in the tests.
...
Since we're here: nothing uses $namespaceNames, $mNamespaceIds or $namespaceAliases
outside of this class (core or extensions) so lets make it protected.
2012-01-27 13:00:26 +00:00
Krinkle
3c9d05055b
[Html] Unit test + bugfix Html::namespaceSelector
...
* Previously it was passing $selectAttribs['name'] to Xml::label, which uses its value for the <label for=""> attribute. This works as long as $selectAttribs['id'] and $selectAttribs['name'] match, but when they don't it fails. <label for=""> always corresponds with <{input,text area,select} id=""> in browsers, never with "name".
* Make name/id match eachother by default to avoid backwards compatibility breakages (they used to match in the Xml class method as well)
* Add HtmlTest.php entries similar to the ones in XmlTest
* Fix E_NOTICE about $params['selected'], default to ''
-- Follows-up r109974, r109698, r109990
-- Bug originally introduced in r41425
-- XmlTest.php still runs successfully
-- HtmlTest.php runs successfully
2012-01-25 03:25:54 +00:00
Krinkle
957c3b5b68
[Unit testing] Re-order attribs to a-z to make testing more reliable
...
* This is in preparation for deprecating this in favor of an Html:: method soon, making sure here that tests still match afterwards
* Follows-up r109698
2012-01-25 00:52:29 +00:00
Krinkle
4790826b97
[Unit testing] Add unit tests for Xml::namespaceSelector
...
* Making Language::namespaceNames explicitly public. It already was but since is being used as such outside the class
2012-01-21 22:26:14 +00:00
Alexandre Emsenhuber
de67af20d0
$wgLanguageCode goes with $wgContLang, not $wgLang. This was breaking ApiBlockTest because $wgContLang->getCode() != $wgLanguageCode.
2012-01-19 10:05:38 +00:00
Chad Horohoe
35a5be8617
@group Broken rather than marking incomplete
2012-01-08 16:38:59 +00:00
Sam Reed
73f3004002
Don't comment tests out, use $this->markTestIncomplete()
...
Followup r104812
2011-12-01 14:40:11 +00:00
Sam Reed
6c289b9fba
Comment out brokwn Xml::dateMenu() tests
...
Failing because it's december (ie the test is wrong)
2011-12-01 00:40:56 +00:00
Niklas Laxström
48714a4968
Followup r99305 - change tests to match behaviour. Would set globals but restoring them manually is just too laborious
2011-10-08 11:58:01 +00:00
Aaron Schulz
31a7892e83
Fixed failing XML tests (on windows) due to newline vs carriage return discrepancy...ugh
2011-07-12 20:05:02 +00:00
Antoine Musso
940f3d5f93
update tests for Xml::label which now support 'title' attribute
...
follow up r90669
2011-06-23 20:05:32 +00:00
Siebrand Mazeland
75c6696aa8
Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely.
2011-05-17 22:03:20 +00:00
Platonides
809102860a
Follow up r87210
2011-05-03 22:37:14 +00:00
Platonides
10cd6f1b6a
Fix the old XmlTest.php test bug in the dateMenu() when the wiki is configured for a languange other than English
...
Other tests were running before and messing with the Language objects.
2011-05-01 19:32:49 +00:00
Brion Vibber
638b6751e1
* (bug 25571) Xml::encodeJsVar now passes floats natively instead of converting to strings
...
Added unit test cases for int, float, and strings that look like int or float.
2011-02-14 00:54:40 +00:00
Antoine Musso
28bab8ff2e
Complete coverage of Xml::DateMenu()
...
r81605 was not hitting all possible conditional tests. Verified with:
php phpunit.php --configuration suite.xml \
--coverage-html /tmp/datecover \
--filter DateMenu
Tests:
PHPUnit 3.5.10 by Sebastian Bergmann.
.
Time: 3 seconds, Memory: 27.50Mb
OK (1 test, 5 assertions)
2011-02-06 22:10:48 +00:00
Antoine Musso
979ebc5189
Tests for Xml::DateMenu()
2011-02-06 21:23:12 +00:00
Antoine Musso
ddd8f91a5b
Tests for XmlSelect::addOption()
...
PHPUnit seems to only accept one class per test file. This patch move the
XmlSelect class to a new file.
It also add some assertions for XmlSelect::addOption(). Please review them
carefully! Although the assertions are fine:
OK (5 tests, 5 assertions)
I am not sure they are the expected behaviour.
2011-02-05 23:41:29 +00:00
Chad Horohoe
447529064b
* verbose and color default output from phpunit
...
* Make a bunch of tests subclass MediaWikiTestCase
* Parser tests and ResourceLoaderTest can't subclass it yet due to various issues
2010-12-28 18:17:16 +00:00
Chad Horohoe
23f69f10ed
Per wikitech-l discussion: Move tests from maintenance/tests/ to tests/. They're not strictly maintenance scripts, and some people want to do a selective checkout that doesn't include the tests. There's still debate on whether we should include these in the release downloads, but we had a pretty firm consensus to move this.
2010-12-14 16:26:35 +00:00