Commit graph

6 commits

Author SHA1 Message Date
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
Platonides
eadb8a3e73 Delay expansion of XmlSelect options until getting the HTML.
Setting the default after adding options now works.
Enabled testSetDefaultAfterAddingOptions().
2011-06-29 14:15:47 +00:00
Antoine Musso
f97e2ef725 tests for XmlSelect::GetAttributes() 2011-05-12 20:07:57 +00:00
Antoine Musso
da4f37facd Improve PHPUnit code coverage
XmlJs:
 - simple class == simple test

GlobalFunctions:
 - wfArrayDiff2: simple test, please add more

XmlSelectTest:
 - test for constructor
 - tests for setDefault. Found a potential bug when setting a default after
   options have been added. The default option will not get marked as selected!
   We should change our code to generates HTML for options at rendering time
   or throw an exception that default can not be used if an option is present.

MediaWiki:
 - basic placeholder generated by PHPUnit
 - tests for setVal() / getVal()
2011-02-06 13:59:06 +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