Commit graph

39 commits

Author SHA1 Message Date
Umherirrender
62002cdcf1 build: Update mediawiki/mediawiki-codesniffer to 35.0.0
Change-Id: Idb413be4b8cba8611afdc022af59810ce1a4531e
2021-01-31 13:34:38 +00:00
addshore
959bc315f2 MediaWikiTestCase to MediaWikiIntegrationTestCase
The name change happened some time ago, and I think its
about time to start using the name name!
(Done with a find and replace)

My personal motivation for doing this is that I have started
trying out vscode as an IDE for mediawiki development, and
right now it doesn't appear to handle php aliases very well
or at all.

Change-Id: I412235d91ae26e4c1c6a62e0dbb7e7cf3c5ed4a6
2020-06-30 17:02:22 +01:00
daniel
0e7f818d4a TextPassDumper: implement prefetch for non-main slots.
This updates BaseDump to support scanning for <text> tags nested in
<content> tags. Without this feature, the prefetch logic will fail for
all slots other than the main slot.

Bug: T246074
Change-Id: I73edd67135cbd3150a4d87448b0c9dd43cf1a2fd
2020-03-24 16:50:46 +01:00
Max Semenik
48a323f702 tests: Add explicit return type void to setUp() and tearDown()
Bug: T192167
Depends-On: I581e54278ac5da3f4e399e33f2c7ad468bae6b43
Change-Id: I3a21fb55db76bac51afdd399cf40ed0760e4f343
2019-10-30 14:31:22 -07:00
Umherirrender
5bd311b1a2 Add public as visibility in tests folder
Add public, protected or private to function missing a visibility
Enable the tests folder for the phpcs sniff

Change-Id: Ibefce76ea9984c47e08c94889ea2eafca7565e2c
2019-10-10 21:55:37 +02:00
Thiemo Kreuz
f5a31f5be0 Remove comments literally documenting unit tests being unit tests
The name of the test class and method as well as the @covers tags already
explain well enough which code a test is testing. Repeating this does not
provide additional information.

Change-Id: Ieec4ec131e5925d11704a11e1df46bc00c9fad9b
2019-02-19 15:18:12 +01:00
Adam Roses Wight
c7e8c25e8f New namespace MediaWiki\Tests\Maintenance
Bug: T184775
Change-Id: I041b8eb4f1ef3cf882a8082ff3f208604b8edf96
2018-01-16 15:09:44 -05:00
Chad Horohoe
93d44c9a42 Move BaseDump into includes/export/
There's no reason for this to have to live in Maintenance land. It's
generally useful and lets us avoid some random require/include calls

Change-Id: I60419c7f9fc52313905053bbeb3aa81666c9160c
2018-01-08 22:10:25 -08:00
Umherirrender
255d76f2a1 build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
Clean up use of @codingStandardsIgnore
- @codingStandardsIgnoreFile -> phpcs:ignoreFile
- @codingStandardsIgnoreLine -> phpcs:ignore
- @codingStandardsIgnoreStart -> phpcs:disable
- @codingStandardsIgnoreEnd -> phpcs:enable

For phpcs:disable always the necessary sniffs are provided.
Some start/end pairs are changed to line ignore

Change-Id: I92ef235849bcc349c69e53504e664a155dd162c8
2018-01-01 14:10:16 +01:00
James D. Forrester
1e9c361960 tests: Replace implicit Bugzilla bug numbers with Phab ones
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.

Change-Id: I46261416f7603558dceb76ebe695a5cac274e417
2017-02-21 02:14:34 +00:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Reedy
7e5b29802e Revert "Swap leading spaces to tabs in backup phpunit tests"
This reverts commit 9ac7cc1300.

Change-Id: I5e05df8d3ab83820008f833f1512689594b81c8a
2015-09-26 19:53:14 +00:00
Reedy
9ac7cc1300 Swap leading spaces to tabs in backup phpunit tests
Change-Id: I821e71ab5c459d11b942f09853dbf4560fbe4d19
2015-09-26 18:54:50 +01:00
umherirrender
26837cd280 Cleanup some docs (tests)
- Swap "$variable type" to "type $variable"
- Fixed spacing inside docs
- Makes beginning of @param/@var/@throws in capital
- Changed some types to match the more common spelling

Change-Id: Ia041964250d8b7c0349d79dc9b131c5b8696e795
2014-08-11 20:06:52 +02:00
Siebrand Mazeland
4ede8c2e9d Pass phpcs-strict on some test files (11/11)
Woo!

Change-Id: I9fc116dfdf18c2772d047adb5bb14535d0bd39ed
2014-04-24 13:51:05 -07:00
umherirrender
092cd8ee31 Fixed some @params documentation (tests)
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.

Change-Id: Ic8aaf0a93796b97d0fa4617c1f86ff59f4b36131
2014-04-17 20:43:42 +02:00
umherirrender
5dbfd5bf80 Fixed spacing
- Removed trailing spaces in comments
- Removed multiple empty lines
- Removed space after object operator

Change-Id: I9fd3256ab490c7cd2034de3fd94e6be6e6d6d8f2
2013-11-21 18:52:25 +00:00
addshore
86adcfb8b7 @covers tags for maintenance tests
Change-Id: Ica5f351f71ee5fccae97560f2de6d75fc5da721b
2013-10-24 19:12:22 +01:00
Siebrand Mazeland
791d0b2a98 Update code formatting
Change-Id: I16a9b42651f1cfb1a70dffbb67b7b83dfeb90d03
2013-04-26 14:21:20 +00:00
Siebrand Mazeland
454d92fb7c Update formatting
8 of n.

Change-Id: I55551510e7afde5b6b981697d5c0efd7b9507585
2013-02-15 13:08:55 +00:00
daniel
329d5b3516 Merge branch 'Wikidata' into master.
This introduces the ContentHandler facility into MediaWiki,
see docs/contenthandler.txt.

For convenient review, a squashed version is available at
https://gerrit.wikimedia.org/r/27191

The ContentHandler facility is a major building block of the Wikidata project.
It has been discussed repeatedly on wikitech-l.

Change-Id: I3804e2d5f6f59e6a39db80744bdf61bfe8c14f98
2012-10-09 11:34:24 +02:00
Siebrand Mazeland
4c0688f4e8 Update version to 1.21.
Change-Id: I0305bb936104eadd60a2f43cdbf7cb676a55d3cb
2012-10-08 20:47:34 +02:00
daniel
9994968774 merged master
Change-Id: Ib2b879c4daa17401eeeb50767c0e5a54254855c3
2012-08-29 15:20:15 +02:00
Daniel Kinzler
392af46809 Revert "merged master"
This reverts commit 67bfdc7a68
2012-08-29 13:14:49 +00:00
daniel
67bfdc7a68 merged master
Change-Id: Ib2b879c4daa17401eeeb50767c0e5a54254855c3
2012-08-29 12:06:38 +02:00
jeroendedauw
38c7f444e1 Use __DIR__ instead of dirname( __FILE__ )
We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :)

Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
2012-08-27 21:45:00 +02:00
daniel
d87135d706 merged master
Change-Id: Iad12ee382d6aeb1fab6fefb611d290b74865ea4b
2012-07-23 22:07:18 +02:00
Christian Aistleitner
85000a975b Choose parentids in tests as they are in real dumps
Change-Id: Ib6e9e0a7bebce2a54c039dea16ddc2115776e777
2012-06-27 22:15:57 +02:00
daniel
b801fa8b3b merged master
Change-Id: I6cf08c09c7d9b38ecce0b2bbed61431939edd7d4
2012-06-20 19:13:16 +02:00
Tobias Gritschacher
066c4095e7 (bug 37458) permission errors running BaseDumpTest on Windows
Change-Id: I58264c5f516f8dcb124d753b43a80b0875b0e974
2012-06-20 11:14:51 +02:00
Tobias Gritschacher
f4d8597d99 fixed bug 37458: permission errors running BaseDumpTest on Windows
patch set 2: removed trailing whitespace;

Change-Id: I58264c5f516f8dcb124d753b43a80b0875b0e974
2012-06-18 18:20:14 +02:00
Aaron Schulz
d04b8ceea6 Merge "(bug 33222) Add parentid to revision in export xml" 2012-06-16 04:25:52 +00:00
Aaron Schulz
88d7c9ec71 Merge "fix backup unit tests" 2012-06-14 19:32:43 +00:00
daniel
3d58f903d8 Merge branch 'master' of ssh://gerrit.wikimedia.org:29418/mediawiki/core into Wikidata 2012-06-11 17:45:59 +02:00
Platonides
26aade100d Remove more register_globals remote includes in the tests
backupPrefetchTest.php, backupTextPassTest.php, fetchTextTest.php
and getSlaveServerTest.php

Change-Id: Ie309f4377e4199d80c0f45dc761d3a14b8d00ec2
2012-06-11 15:29:52 +02:00
umherirrender
8a970f5140 fix backup unit tests
Follow up changes I84588e3d9692ee9eb7411b1e391abfc6c9ee89bf and
I030d245715174daeaf24723ebc156ab36761a035

Change-Id: I7e9d6d1e723af41b2af71f44e782f6d49b5f9909
2012-06-10 19:13:24 +02:00
umherirrender
afa123ccf8 (bug 33222) Add parentid to revision in export xml
From bug description: "This is helpful for incremental dumps, to know if
there are revisions missing between the last full dump and this
incremental dump"

Change-Id: I772f976942a306ad573efc659d09714e8250f5ec
2012-06-09 15:41:55 +02:00
daniel
a827739fb5 always record content model and format in export/dumps 2012-06-07 13:02:54 +02:00
Christian Aistleitner
76cefaf165 Adding tests for dumps
Change-Id: I9aa3b6d7349458b3e2b2c7111bda739bacc22f9f
2012-04-28 11:37:07 +02:00