Commit graph

808 commits

Author SHA1 Message Date
Christian Aistleitner
02c05b9d0e Correcting type of DatabaseSqlite::insertId()
Change-Id: I37ebe291cf8c4fd66a1ee236fcfa063016efbc8d
2012-04-06 21:02:27 +02:00
Reedy
a521673dc2 Merge "tests related to API block action and its gettoken" 2012-04-06 15:38:25 +00:00
Hashar
e41c77eda7 Merge "Un-marking testMakeNormalBlock as broken..." 2012-04-06 06:42:07 +00:00
Brion VIBBER
f781c4e414 Merge changes Id1ac2f8b,I48f8cd17,I10481ce6,Id4530499
* changes:
  PHPUnit preparations for tests of maintenance
  Database dependency injection for BackupDumpers
  Pulling in fix for superfluous header
  TextPassDumper::initProgress pull in default value
2012-04-04 17:43:45 +00:00
Reedy
cdbfe8db86 tests related to API block action and its gettoken
Add tests for:
 - action=block and action=unblock gettoken
 - attempting to block or unblock a user with no token passed.

Patchset2: use a provider to have tests run against both 'block' and
'unblock' actions.

Change-Id: I686348ff4e2fe419c556acea2fa59dd203dc9440
2012-04-03 22:27:57 +02:00
Reedy
6eb4171a07 Un-marking testMakeNormalBlock as broken...
Change-Id: I5960d71409dc6338249817bc67de5227845dc3d8
2012-04-03 21:16:40 +01:00
Antoine Musso
633c4542c6 disable broken ApiBlockTest::testMakeNormalBlock()
That test has probably always been broken and use an invalid token. The
bug tracking brokenness is http://bugzilla.wikimedia.org/35646

Since the broken test is merged in master, that block the integration of
Jenkins and Gerrit by having any submitted patchset to be reported as
failling :-(

Root cause is https://gerrit.wikimedia.org/r/3434 which made the
Block/Unblock API to actually verify the token previously always
considered valid (bug 34212).

Change-Id: Iecf6b083163c214c734360b2f6d9b4bed8af07dc
2012-04-03 15:08:57 +02:00
Christian Aistleitner
8ba98560af PHPUnit preparations for tests of maintenance
Change-Id: Id1ac2f8b940e5417e0facaacb7d5ec30b48a9efb
2012-04-03 12:57:10 +02:00
Santhosh Thottingal
c56cca551e (bug 32748) unicode URL for articles print version
Printer friendly version of article must encode URL in unicode.

- Patch originally written by Brion Vibber
  https://bugzilla.wikimedia.org/attachment.cgi?id=9593
- introduces wfExpandIRI() global function, uses wfExpandIRI_callback.
- phpunit test.

Change-Id: I348b9f1d2ce65cb14f20d4a5751ac9359c8b8316
2012-04-02 18:14:41 +02:00
Antoine Musso
da8ba7c544 Regroup all API tests in the 'API' PHPUnit group
That will let us tests all the API tests by using PHPUnit group
filtering such as:

 php phpunit.php --group API

Also cleaned some whitespaces

Patchset-4: skipped files that had only whitespace changes

Change-Id: I51e03d910521b061f505e3a9b11a08c7b95f1538
2012-04-02 16:55:31 +02:00
Santhosh Thottingal
b91ffd7b09 Add phpunit testcases for Bug 30681
- The fix was done in https://gerrit.wikimedia.org/r/3842

Change-Id: I9874604828c1ae4ce0948ed7533a57dea9ac736d
2012-03-28 15:36:23 +05:30
Antoine Musso
9a5cbc553e RecentChangeTest use the Database
Moving RecentChangeTest to the Database group will fix Jenkins jobs
handling databaseless tests.

Change-Id: I3f14120e806c35b19e96747aa43d6c64a6b504ca
2012-03-23 18:20:01 +01:00
Sam Reed
c27fbf5330 Trim trailing whitespace
Add/improve documentation

Explicitly define a few variables

Change-Id: If0017770a0a47f8f6be178b5bde8ae6691f74b6a
2012-03-21 15:47:05 -07:00
Roan Kattouw
311200ee2c Revert r114067, r114071, r114075, r114079, r114081, r114082, r114084, r114086, r114088, r114089, r114101, r114118, r114137, r114147, r114164, r114172, r114175, r114180, r114208, r114209, r114215, r114219, r114226, r114321, r114322.
This reverts the SpecialCachedPage and formatDuration sagas, with some collateral damage here and there. All of these revisions are tagged with 'gerritmigration' and will be resubmitted into Gerrit after the Gerrit switchover. See also http://lists.wikimedia.org/pipermail/wikitech-l/2012-March/059124.html
2012-03-20 23:03:59 +00:00
Jeroen De Dauw
d42c2f4d7a added some tests using the intervals param 2012-03-20 22:48:28 +00:00
Sam Reed
daa4e524b7 More occurrence typos 2012-03-19 21:40:39 +00:00
Aaron Schulz
7c54a34730 Reverted r113688, r113691 per CR and filed #61440 upstream. 2012-03-19 18:28:47 +00:00
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
Jeroen De Dauw
bc9cca92ed follow up to r114084, add tests for stuff w/ multiple units 2012-03-17 23:26:37 +00:00
Sam Reed
a2dc33a5a3 Trim trailing whitespace
Add/improve documentation

Explicitly define a few variables
2012-03-17 22:52:54 +00:00
Sam Reed
e8ab5f6466 Noralise a few of the magic numbers used in r114084 2012-03-17 22:47:02 +00:00
Sam Reed
5736aa4132 Unit tests for r114067 2012-03-17 22:39:38 +00:00
Max Semenik
e7001ff574 Follow-up r113922: tests 2012-03-15 15:38:11 +00:00
Aaron Schulz
19799ae5bb Tweak testFileRepoConstructionWithRequiredOptions so that it doesn't fail depending on the config of the wiki being tested on. 2012-03-13 01:44:39 +00:00
Aaron Schulz
c8cc2ff897 r113688: updated test assertions 2012-03-13 00:18:29 +00:00
Sam Reed
b18ea7dee2 Normalise casing of getArticleID used in core 2012-03-11 18:54:55 +00:00
Aaron Schulz
783f7f0bd3 [FileBackend] Made doOperations() Status handling align with documentation as well as what FileRepo is essentially expecting when using the 'force' option (it assumes fatals are for total batch failures, not just partial ones). The relevant documentation was also improved. 2012-03-08 22:31:04 +00:00
Krinkle
1e5689852b [Html::namespaceSelector] Remove default id/name attributes
* Remove default id/name attributes
* Remove now redundant tests introduced in r110274
* Add tests to make sure label has no 'for' attribute when label isn't null but name/id are unset
* Update tests to not include id="" and name="" when calling with no arguments
* Updating calls to add name/id if needed, and while at it remove useless 'null' params


* Context:
-- Introduced in r109990, r111376, r111315
-- No callers exist that assume these defaults. Forcing an ID that should be unique is annoying and redundant. The name used in the query when submitting a form should be mentioned in the same file where it is used from the submission, never assume what name="" is from unrelated code
-- Same for ID, this is often used in CSS or JavaScript, shouldn't be assumed. (It should be simple to but two simple namespace selectors on a page without getting DOM conflicts)
2012-03-07 19:14:20 +00:00
Antoine Musso
160a471957 (bug 34302) Add CSS classes to email fields in user preferences
Patch by Nischay Nahata whom I have mentored earlier this week.
2012-03-07 09:56:24 +00:00
Sam Reed
6b1c5279b3 Fix mixed/messed up whitespace 2012-03-07 01:09:35 +00:00
Alexandre Emsenhuber
1f6f0371cc Make RecentChangeTest work by using the same context for expected and actual results. They were failing on my installation because $wgLang->getCode() != $wgContLang->getCode() when the test was called. 2012-03-05 21:21:34 +00:00
Antoine Musso
2741323b9b amend r113016 , that was for bug 34302 2012-03-05 11:50:30 +00:00
Antoine Musso
3c098d1da5 place holder to test bug 34919 when it is fixed 2012-03-05 11:48:35 +00:00
Aaron Schulz
ea6b51694e r112563: Removed random bogus user IDs passed into to Block constructor in tests 2012-02-28 02:32:59 +00:00
Krinkle
3cb731351e [IRC Log Message] Fix for protect/protect and protect/modify
* protect/protect and protect/modify were still failing because the output on IRC is not matching the i18n messages. The bots look for comment.match(<i18n-message> + (optionally) followed by ": user comment").
* The problem with protect/protect and protect/modify is that the protection settings are also inserted in somewhere in the message. Before MediaWiki 1.19 these were included in the IRC message as part of $1 (title). That may be ugly, but that's how it has always been. Since the point is to reproduce the old output we need to fix this one as well. This will make the output like:

  Krinkle * protected "[[Sandbox [edit=autoconfirmed)]]"

which is exactly how it has been before and that's the the bots rely on (which was presumably done originally like that since it was the only way to make the output match the i18n message)

* Fixes more bug 34508
2012-02-28 01:56:15 +00:00
Krinkle
6c3ab734a9 [RecentChangeTest] Refactor unit test to test better test the issue
* assert used message-keys/variables instead of hardcoded values
* Pass $comment to the assertion helper instead of using it by default so that actions that don't use a comment (such as patrol) don't get forced a comment, to better replicate the IRC behavior
* Adding placeholder for Auto-Edit-Summary things that should also be checked in here, not sure how to do those yet
* Adding tests for block/* and protect/*
2012-02-28 00:39:01 +00:00
Antoine Musso
b2d220519d rename test file to end with Test.php :D 2012-02-25 21:39:54 +00:00
Antoine Musso
ab046e8362 basic tests for bug 34508 2012-02-25 21:22:49 +00:00
Antoine Musso
f40529b464 avoid test suite file leaks 2012-02-24 20:30:55 +00:00
Max Semenik
66cb810778 Test that verifies uniqueness of query module prefixes 2012-02-24 18:49:48 +00:00
Antoine Musso
fc324a18d2 better structure filename error output
When dumping an array, PHPUnit limit the number of characters shown. That would
just hide the relevant part of the path:

1) StructureTest::testUnitTestFileNamesEndWithTest
[...]
 Array (
+    0 => '/some/path/tests/phpunit/incl...ge.php'
+    1 => '/some/path/tests/phpunit/incl...ki.php'
 )

By stripping the common path ( /some/path/tests/phpunit ), we end up with a
more useful output:

 Array (
+    0 => 'includes/RecentChange.php'
+    1 => 'includes/Wiki.php'
 )
2012-02-24 16:54:48 +00:00
Antoine Musso
f5b45904e1 avoid exif tests file leakage
Exif test are leaking files heavily on our test server. This quick patch make
it sure we delete temporary files.

Ideally, we should have something like a temporary filesystem backend that
would self destruct :-D

requires r112326: wfRecursiveRemoveDir()
2012-02-24 15:43:11 +00:00
Daniel Friesen
d0a51ee5a4 Fix bug 34684 in my PathRouter code:
- Update the tests to test extra characters and patterns like like \\ and $1
- Also update the tests to make sure that matches that don't have enough data to work fail
- Replace the str_replace and preg_match based code with code based on preg_replace_callback.
2012-02-24 11:31:36 +00:00
Platonides
f13819e5be xdiff_string_rabdiff() appeared in version 1.5.0 of xdiff extension.
PHP manual saying PECL xdiff >= 0.2.0 is wrong.
Follow-up to r111701
2012-02-20 16:03:40 +00:00
Tim Starling
e1ee5c469b (bug 34428) Fixed hash mismatch errors in DiffHistoryBlob::patch() by simulating LibXDiff's broken Adler-32 implementation. 2012-02-16 23:27:00 +00:00
Sam Reed
8e78fbe32b Cleanup a few unused globals 2012-02-16 02:35:48 +00:00
Alexandre Emsenhuber
3732676a8c Removed assertions calling MWNamespace::isMain() from MWNamespaceTest::testIsSubject() that give an error since the former now calls wfDeprecated() 2012-02-15 13:31:20 +00:00
Antoine Musso
51dacc9fbf split ns selector tests for filter / disable options
ping r111376
2012-02-14 09:59:59 +00:00
Alexandre Emsenhuber
765d9ca795 Use WikiPage instead of Article to call doDeleteArticle 2012-02-13 16:38:37 +00:00
Krinkle
78c157faf9 [Html] Follow-up r109990: Add support for excluding and disabling options 2012-02-13 15:08:26 +00:00