Commit graph

296 commits

Author SHA1 Message Date
Chad Horohoe
0101367c6f Rm some more completely incomplete tests. If you're not going to add the test, don't add to suite execution time by adding empty tests like this 2011-06-13 21:55:22 +00:00
Chad Horohoe
c60a470ed4 Drop suite full of incomplete tests. Tired of it cluttering my runs 2011-06-13 21:49:20 +00:00
Max Semenik
568b0489fe avoid test being marked as incomplete due to lack of assertions 2011-06-13 19:22:52 +00:00
Jure Kajzer
edd10806bc * merge r89759 from REL1_17 into trunk
* changed addQuotes expected result for addQuotes in DatabaseTest
2011-06-09 08:43:53 +00:00
Platonides
51da374bd1 Reinstate r79122 (fix for bug 14404), reverting r83868. The real bug seem to have been r86131, fixed in r88902 (1.17) and r88902 (1.18).
This is not merged with the r86131 change to Article::getParserOptions() since I don't see the point for the new function yet.
Reenabled its test ArticleTablesTest which was disabled in r85618
2011-06-07 22:28:57 +00:00
Brion Vibber
315ac38cd6 Added phpunit test cases for r87497, r88076: ResourceLoader module name prefix collapsing 2011-06-07 17:56:40 +00:00
Platonides
c7137c50a4 Follow up r89585. Clean up after the test, expand inContentLanguage() comment. 2011-06-06 21:24:23 +00:00
Niklas Laxström
73776c92ee Fix for bug 29274 - Message class ignores $wgForceUIMsgAsContentMsg
Also added tests, which pass
2011-06-06 17:55:19 +00:00
Tim Starling
d5294e3b73 Test filename updates for r89558. 2011-06-06 12:00:57 +00:00
Tim Starling
f3f1fcdc2c * Added a REQUEST_URI check to the bug 28235 handling.
* Moved most of the bug 28235 code out to a separate library class, since I was running out of distinct function names. 
* Merged the QUERY_STRING and PATH_INFO security checks, since they are dealing with the exact same problem. Removed WebRequest::isQueryStringBad(). 
* Deal with img_auth.php by having it specify what extension it expects to be streaming out. This extension can then be compared with the extension that IE might detect.
2011-06-06 11:59:20 +00:00
Sam Reed
df02234e07 Fix unit tests for r89515 2011-06-05 18:42:50 +00:00
Chad Horohoe
d5ee30e6da pear -> port 2011-06-04 21:34:07 +00:00
Chad Horohoe
ebb0191a59 Also support macports 2011-06-04 21:32:51 +00:00
Max Semenik
f1415babe0 Use getSearchEngine() instead of constructing class name manually 2011-06-03 19:55:37 +00:00
Happy-melon
295f513e8b More unpicking of r85288. I think this is all of the magic method calls, but they're very hard to grep for (part of the problem with them!), so let's leave the calls in with a wfDeprecated() for a while... 2011-06-03 11:04:49 +00:00
Chad Horohoe
cb569f094f Fix some of the weird freaky interaction between ApiBlockTest and BlockTest.
* By using the same summary for both, we allow both sets of tests to pass with --filter Block
* Just testing includes/BlockTest.php still passes
2011-06-03 06:22:18 +00:00
Chad Horohoe
db833df9dc Remove useless bootstrap inclusions 2011-06-03 04:25:21 +00:00
Mark A. Hershberger
a6722cc9aa w/s changes. 2011-06-02 19:32:45 +00:00
Max Semenik
7ad10e271d Don't duplicate tables starting with unittest_ which can be left if a previous run ended with a fatal on SQLite 2011-06-02 17:58:34 +00:00
Chad Horohoe
6f7e2eb71e Followup r89311: rv unrelated changes 2011-06-02 01:28:30 +00:00
Chad Horohoe
89529808d8 Make user right selection in installer actually work, thanks Krinkle for spotting this 2011-06-02 01:26:26 +00:00
Chad Horohoe
a98cdb721d Mostly revert r89302, was slower than the original 2011-06-01 23:17:29 +00:00
Chad Horohoe
5004f09bfa Exclude Block tests until somebody fixes them, also cache listTables() result so we can skip some queries 2011-06-01 22:54:33 +00:00
Chad Horohoe
f639fcdc4f Test db cleanup
* Fix Oracle stuff per CR on r88755
* Don't expect tests to clean up after themselves, do it in MediaWikiTestCase::run() (skipping user and interwiki, also per CR)
** Also don't do it from the destructor, phpunit calls this more often than you'd think
* Need to find: way to detect "is this the last test?" so we can drop our tables on completion
2011-06-01 22:43:19 +00:00
Brion Vibber
174b7d6a7a Add more super-cookie test cases to HttpTest; things like org & .org aren't being handled correctly either. Not super high prio but... should probably mark these tests broken if can't be fixed easily yet. 2011-06-01 22:27:24 +00:00
Brion Vibber
31f414f75f Refactor validateCookieDomain test cases to use a data provider and report which bit's being tested so we can identify failures (there is still one failure in this set) 2011-06-01 22:13:47 +00:00
Brion Vibber
538578bdde Tweak HttpTest following r89278:
* remove FTP test case URL (shouldn't actually work, and as a directory listing, not super stable)
* remove old test case URLs that are now 30x redirects (example.com and a toolserver link), which broke the comparison tests
* added in http://en.wikipedia.org/robots.txt so we've got a nice basic fetch on one of our servers too

Now this test class is down to 3 failures, in URL & domain validation stuff
2011-06-01 21:25:45 +00:00
Brion Vibber
218b50d703 HttpTest regression fix: test URL on example.com no longer returns a 404 (now a 302 redirect), so switching the 404 tests to use an URL on mediawiki.org in the /xml/ dir where we stash actual files. 2011-06-01 21:13:13 +00:00
Mark A. Hershberger
623083aa78 Fix Bug #29231: PhpHttpRequest doesn't support HTTPS
Tested fix with PHPUnit Tests that aren't currently executed by
CruiseControl b/c they're marked “broken” till someone comes up with
some reasonable unit tests that will work for everyone.
2011-06-01 18:57:33 +00:00
Tim Starling
529e92b283 Fixes for r88883, r89197:
* Modified WebRequest::findIE6Extension() to fix the performance issue and the hash parsing issue I noted on CR 
* In FindIE6ExtensionTest, fixed all the assertEquals() calls, I had the expected and actual around the wrong way
* Added a couple of extra tests for cases that seemed important during the rewrite.
2011-06-01 00:51:09 +00:00
Antoine Musso
dacec03bde really add NewParserTest to the Stub group
PHPUnit 5.3.13 does not like having comments after the '@group name' command.
This class was not part of the Stub group and run despite the exclusion of
the Stub group in our suite.xml

Properly fix issue described in r89223 and complete r89226
2011-05-31 20:35:35 +00:00
Platonides
6c2654b7f8 Revert r89223. MediaWikiParserTest is needed to run all the $wgParserTestFiles
NewParserTest.php standalone running of the first $wgParserTestFiles item is just a convenience.
2011-05-31 20:30:12 +00:00
Antoine Musso
d24a26e713 NewParserTest.php can now work independently
PHPUnit load class according to their order on the filesystem I guess.
On the cruisecontrol host, it first load NewParserTest.php and run
the test then load MediaWikiParserTest.php which run the tests too!

On my host the order is reversed, and NewParserTest.php is never run
for a reason I have not investigated.

Anyway, deleting the MediaWikiParserTest.php is harmless since it is
redundant with NewParserTest.php

(should fix cruise control)
2011-05-31 19:51:48 +00:00
Tim Starling
3f8de2d175 Tests for r88883, including two failing tests. 2011-05-31 02:09:22 +00:00
Antoine Musso
0bbfc95f3c add broken test to broken group (not incomplete)
This test suite really needs to be fixed, marking them as incomplete does not
let us tests them easily.  Instead, I have added them to the Broken group thus
we can easily run them and do not break the continuous integration system.
2011-05-30 18:58:07 +00:00
Max Semenik
dd372ba664 rvv:P r89179: it doesn't work on Windows Which should have been clear from comment a few lines above 2011-05-30 18:40:27 +00:00
Antoine Musso
fe047c135b enable colors in PHPUnit
Since PHPUnit support color output, we might as well use it :)
2011-05-30 18:26:46 +00:00
Antoine Musso
a66e9a7283 ApiBlockTest: delete a block only if it exist
Fix cruise control, follow up r89071
2011-05-28 21:43:06 +00:00
Antoine Musso
6642e733c6 Use the correct ID when retrieving a block
The ID might be different than the one you expect. Since r88755 the tables
are no more dropped and recreated, thus the autoincrement pointer is not
reset.  A previous test could have raised that pointer, thus the id might
be above the expected value.
This patch track the block ID inserted and use it in the assertion.
2011-05-28 21:25:29 +00:00
Antoine Musso
2a198b5f06 ApiBlockTest now remove block it creates
This follow up r88755 that make tests depends on each other. The creation
of a Block through the API is troublesome to the BlockTest suite.

Requires r89070
2011-05-28 21:22:29 +00:00
Antoine Musso
6d221bdabe Allow test to remove data from the database
This new removeDBData() is run after the tests result. It is similar
to the addDBData() method.
2011-05-28 21:19:24 +00:00
Alexandre Emsenhuber
ba1bd85fcc svn:eol-style native 2011-05-28 15:11:39 +00:00
Antoine Musso
827254b99f Handle old libxml when extracting SVG metadata
Mac OS X 10.5.8 comes with libxml 2.6.16, thus some methods of XMLReader
are not availabe (ex: readInnerXML()).
This patch, throw an error if the above method does not exist (only one
use in our code).

Since metadata can comes as string or an XML fragment, I have split the tests
to take care of the two usages and of the exception.
2011-05-28 09:58:43 +00:00
Antoine Musso
716d85ad7e * Fix db->makeList() spacing
* Tests assertions where upside-down (expected <-> value)
* Tests did not use LIST_AND

Follow up r87992
2011-05-28 09:03:44 +00:00
Antoine Musso
af02c4193b Only run CleanUpTest on a quarter of the cases.
Speed up the testDoubleBytes & testTripleBytes which generates 32k assertions.
The processing took 12 and 18 seconds respectively on my computer, now down
to 8k assertions.
2011-05-28 08:38:14 +00:00
Brion Vibber
d13482fdbe * (bug 27465) Fix metadata extraction for SVG files using unusual namespace names
The previous fix (in r82307) only checked explicitly for a namespace given the 'svg' prefix; this fix use XML namespacing support on XMLReader to check for the actual namespace URI correctly.
Fixed up a test case (for RDF extraction) and added trimming on the whitespace.
Also added another test case file that doesn't use a namespace name on the root.
2011-05-25 23:59:43 +00:00
Brion Vibber
e6db788e30 Test cases for bug 27465: problems with XML namespace handling break SVGMetadataExtractor::getMetadata()
$ php phpunit.php includes/media/SVGMetadataExtractorTest.php 
PHPUnit 3.5.13 by Sebastian Bergmann.

..E

Time: 1 second, Memory: 14.00Mb

There was 1 error:

1) SVGMetadataExtractorTest::testGetMetadata with data set #2 ('/var/www/trunk/tests/phpunit/includes/media/US_states_by_total_state_tax_revenue.svg', array(593, 959))
MWException: Expected <svg> tag, got ns0:svg

/var/www/trunk/includes/media/SVGMetadataExtractor.php:105
/var/www/trunk/includes/media/SVGMetadataExtractor.php:78
/var/www/trunk/includes/media/SVGMetadataExtractor.php:30
/var/www/trunk/tests/phpunit/includes/media/SVGMetadataExtractorTest.php:14
/var/www/trunk/tests/phpunit/MediaWikiTestCase.php:63
/var/www/trunk/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/var/www/trunk/tests/phpunit/phpunit.php:60

FAILURES!
Tests: 3, Assertions: 2, Errors: 1.
2011-05-25 23:34:20 +00:00
Alexandre Emsenhuber
6ed5d02094 Also change $wgLanguageCode along with $wgContLang, this was breaking when arriving at LanguageConverterTest with "nooo!" 2011-05-25 18:37:32 +00:00
Chad Horohoe
b7bc5a8db5 Workaround for duplicate key errors 2011-05-25 00:49:51 +00:00
Chad Horohoe
26ec01f63c Extend MediaWikiTestCase in a few places 2011-05-25 00:30:06 +00:00