Http::get/set/request() now all take a new $caller parameter
which is like $fname in databases. Pass it __METHOD__ so all
of your external requests can be grouped together in profiling.
Change-Id: Ibad219452903a9678378044595cff1231bf605d8
The mediawiki-core-regression-hhvm-master test for I21747063 found
failures for some constants provided by the provideCurlConstants()
array.
https://integration.wikimedia.org/ci/job/mediawiki-core-regression-hhvm-master/2072/console
I have commented out the failures that occur in the current mw
HHVM 3.3.0 environment in order for the test to pass. none of the
commented out constants appear in the mw core code.
PHP 5.6.0 removed several cURL constants http://php.net/manual/en/curl.constants.php.
I have commented out those constants and verified that they do not
exist in the mw core code.
Bug: 71729
Change-Id: I30c5e78eacf19071aaf44834ca188172f082e161
Fix almost all occurences of the following sniffs:
Generic.CodeAnalysis.UselessOverridingMethod.Found
Generic.Formatting.NoSpaceAfterCast.SpaceFound
Generic.Functions.FunctionCallArgumentSpacing.SpaceBeforeComma
Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine
Generic.PHP.LowerCaseConstant.Found
PSR2.Classes.PropertyDeclaration.ScopeMissing
PSR2.Files.EndFileNewline.TooMany
PSR2.Methods.MethodDeclaration.StaticBeforeVisibility
Change-Id: I96aacef5bafe5a2bca659744fba1380999cfc37d
This commit depends on the introduction of
MediaWikiTestCase::setMwGlobals in change Iccf6ea81f4.
Various tests already set their globals, but forgot to restore
them afterwards, or forgot to call the parent setUp, tearDown...
Either way they won't have to anymore with setMwGlobals.
Consistent use of function characteristics:
* protected function setUp
* protected function tearDown
* public static function (provide..)
(Matching the function signature with PHPUnit/Framework/TestCase.php)
Replaces:
* public function (setUp|tearDown)\(
* protected function $1(
* \tfunction (setUp|tearDown)\(
* \tprotected function $1(
* \tfunction (data|provide)\(
* \tpublic static function $1\(
Also renamed a few "data#", "provider#" and "provides#" functions
to "provide#" for consistency. This also removes confusion where
the /media tests had a few private methods called dataFile(),
which were sometimes expected to be data providers.
Fixes:
TimestampTest often failed due to a previous test setting a
different language (it tests "1 hour ago" so need to make sure
it is set to English).
MWNamespaceTest became a lot cleaner now that it executes with
a known context. Though the now-redundant code that was removed
didn't work anyway because wgContentNamespaces isn't keyed by
namespace id, it had them was values...
FileBackendTest:
* Fixed: "PHP Fatal: Using $this when not in object context"
HttpTest
* Added comment about:
"PHP Fatal: Call to protected MWHttpRequest::__construct()"
(too much unrelated code to fix in this commit)
ExternalStoreTest
* Add an assertTrue as well, without it the test is useless
because regardless of whether wgExternalStores is true or false
it only uses it if it is an array.
Change-Id: I9d2b148e57bada64afeb7d5a99bec0e58f8e1561
* 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
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.
I always thought the colon and semicolon punctuation marks were named after
their architectural equivalent: column. At least, to me, it made more sens
than using a term relating to thedigestive system.
Per Nikerabbit r83296
Those tests are made to help someone fix bug 27854. You might want to add
some more. Please note we want this function to only validate curl supported
URI, hence the hardcoded protocols http,https and ftp.
Some of those tests currently fail because of bug 27854.