Commit graph

26 commits

Author SHA1 Message Date
Umherirrender
67d420b302 Move @group and @covers tags in tests close to class
For @group and @covers tags there should be no newline between the
comment and the class

Change-Id: I7277df13a332cf4d74ffdd8748e3fbdc259610dc
2018-01-28 13:30:07 +01:00
Timo Tijhof
d8cf850032 InstallDocFormatter: Add missing @covers scope
The format() method is a one-line wrapper around execute(), which
is the real method being tested here. Given the class doesn't
contain any other methods, increase the scope to the whole class.

Change-Id: I8b2c7736c6708c0915a9ce15fef0dc85c63621ea
2017-11-22 11:01:54 -08:00
Bartosz Dziewoński
b225a84ff9 DatabaseUpdater: Stop inserting junk into 'updatelog' every time the updater runs
Nothing ever looks at these rows, and if you have update.php in a Cron
job or a Git hook or something, they can accumulate in huge numbers.

Also remove a test which verified that the rows get inserted.

If you reached this place while trying to find out what the weird
"updatelist-1.28.0-14628929450" rows in your database are, rest
assured they are useless. If they're causing disk space problems,
you can delete them:

  DELETE FROM updatelog WHERE ul_key LIKE 'updatelist-%';

Change-Id: If94f243810e82ea3724cbd47b301bb96ba9a49d9
2016-11-30 20:13:30 +00:00
Fomafix
202f695f67 Update weblinks in comments from HTTP to HTTPS
Use HTTPS instead of HTTP where the HTTP link is a redirect to the HTTPS link.

Also update some defect links.

Change-Id: Ic3a5eac910d098ed5c2a21e9f47c9b6ee06b2643
2016-11-07 15:24:46 +01:00
Aaron Schulz
5bbac35ed1 Replace DatabaseBase:: with Database:: and update type hints
Change-Id: I3919b04eb2de4fa0bf8a02239fb5bbf17d347511
2016-09-27 04:20:03 +00:00
Aaron Schulz
dc7338be6f Set more fields in fake DB subclasses to avoid errors
Change-Id: I6b24422e830a8f82ba24383b3425808cb2a28b15
2016-09-21 11:56:28 -07:00
Aaron Schulz
69aa57ed91 Set the DatabaseDomain in some tests classes for sanity
Change-Id: I6531dc6cf89fbe7e5656354bcd4a27369f573752
2016-09-21 10:02:31 +00:00
Aaron Schulz
67f08d6990 Add LBFactory::beginMasterChanges() for doing DBO_TRX rounds
This is in intended to replace the DataUpdate transaction round logic.
It could also be useful for doing transaction rounds in maintenance
scripts.

Also renamed $db => $conn in a few LB methods for consistency.

Change-Id: If21c2ba5e8bac48c250b96137279e7edaa8289f7
2016-08-23 18:09:28 -07:00
umherirrender
eac06f65ce Use more short array syntax in comments (/tests/)
Change-Id: I86c73cb9447ac562a73348b4030e24ebf49a90dc
2016-07-10 17:23:29 +02: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
Kevin Israel
6c247aa591 InstallDocFormatter: Hyperlink Phabricator task numbers
Also removed the callback functions for the existing regexes. Nothing
has to be or is encoded or escaped at this time, so preg_replace()
can be used instead of preg_replace_callback().

Change-Id: I8cdddd602dcf7b67b8f2b06149b6a0859c70342c
2014-11-21 03:05:44 -05:00
physikerwelt (Moritz Schubotz)
eab45e37b6 Fix strict warning in FakeDatabasUpdater::setAppliedUpdates
Follows-up ccd051bc44.

To be consistent with DatabaseUpdater::setAppliedUpdates
the second arg $updates is now optional.

Change-Id: Ida2adfe30099ea4c65f0c16fafc4eae6603fc93a
2014-10-13 13:36:09 +00:00
physikerwelt (Moritz Schubotz)
ccd051bc44 Add counter to DatabaseUpdater::setAppliedUpdates
The key was constructed depending on the current time only.
This method fails, if multiple updates are performed
within one second.

Bug: 71087
Change-Id: Id7e30298729b3abb1501a34fcc1ba4e45d2172f0
2014-10-09 06:13:54 +00:00
Siebrand Mazeland
896bda7c85 Pass phpcs-strict on some test files (7/11)
Change-Id: Ia0ceea60e7ef43959f868378f3fcd463a3adf782
2014-04-24 18:27:12 +00:00
Ladsgroup
1ba0445c12 Changing URLs of mediawiki.org in scripts to the SSL-based website
http://www.mediawiki.org --> https://www.mediawiki.org

Part 2

Change-Id: I3be61fe3dfb502cc20180486eb1a8016eac151df
2014-03-12 23:24:03 +00:00
addshore
de7af7ac2c Fix scope on all /phpunit test methods
Change-Id: I3ce92463d485a0fb23e464e9a8059330f32d79af
2013-10-24 10:31:32 +02:00
addshore
4e941cf4ca Add @covers tags for more tests
Change-Id: Iff3af78e9b41c445b7f066b6c0d0f4a87d2d6c4e
2013-10-21 11:28:39 +02:00
Kevin Israel
4bec48cb47 Web installer: correctly show note for I4ecd0659
InstallDocFormatter didn't escape the double underscores in
__TOC__. I also noticed that wfEscapeWikiText had a similar
bug, which I reported as bug 53658 (fixed separately).

Change-Id: Ib5346b9c234f1c5ef361cc4357352b09def5dc25
2013-09-15 14:31:50 -04:00
umherirrender
24bfde2710 Fix spacing and break some lines
Change-Id: Ia57685d8858e02e399ad5c75ce64d12609d340ac
2013-08-24 17:06:25 +02:00
freakolowsky
ffe6e12a8a Fixed EZConnect string regex in OracleInstaller class.
The Oracle connect string was valid only if it contained alphanumerics,
underscore and dot. Some new schmemes makes uses of slashes and
EZConnect has the concept of server types (pooled, dedicated, shared)
which we now validate.

The long regex is now in OracleInstaller::checkConnectStringFormat()
(flagged with @since 1.22). The patch provides a bunch of very basic
tests to test out the regex.

Change-Id: Ie3a0af9801bfdbc9129298be07e1676145a1607a
2013-05-31 16:03:58 +02:00
Timo Tijhof
b36d883017 Tests: Make phpunit providers "public static".
Follows-up I9d2b148e57 (including phpunit/languages this time).

Bug: 46434
Change-Id: I30e5efcd88c516121c454676bd7a18f9b7c8fca6
2013-03-22 03:12:37 +01:00
Siebrand Mazeland
de04f37ef1 Update formatting
5 of n.

Change-Id: I811ca957b6588085d67606ebc0cd4033a1e53839
2013-02-15 12:35:50 +00:00
Chad Horohoe
9d2a5d2b30 Basic first round of testing for the InstallDocFormatter 2011-06-29 01:26:56 +00:00
Tim Starling
b4311ca022 Fixes for r90105, r90193:
* Actually removed $wgProto.
* Per Aryeh's suggestions on the future of $wgServer: made $wgServer detection in DefaultSettings.php more permanent by merging it with the new code from r90105. This means that bug 14977 is properly fixed now. 
* Require entry points to set up the autoloader before including DefaultSettings.php. Comments on bug 14977 indicate that at some point in the past, this may have broken something. Anything that breaks now should just be fixed, we need the autoloader. Tested the most common entry points.
* Since the detection code has moved from Installer to WebRequest, I also moved the relevant test file and updated the test. The function under test is now public static, so r90154 is superseded.
2011-06-16 05:52:16 +00:00
Chad Horohoe
f04b134ebd Followup r90105, ReflectionMethod::setAccessible() requires PHP 5.3.2. Mark incomplete otherwise 2011-06-15 20:57:13 +00:00
Tim Starling
6a2123260b * (bug 28798) Set $wgServer in the default LocalSettings.php
* (bug 14977) When detecting $wgServer, treat IPv6 addresses in $_SERVER['SERVER_NAME'] etc. in a sensible way. 
* Tests for the new functions in IP.php and Installer.php
2011-06-15 07:35:47 +00:00