aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/MWFunctionTest.php
Commit message (Collapse)AuthorAgeFilesLines
* Move Test files under same folder structure where class is (/includes/)umherirrender2014-12-161-34/+0
| | | | Change-Id: I95f1aa6f0ed2cc3306aa6e588a11f359854315c1
* Deprecate MWFunction::newObj() in favor of ObjectFactoryKunal Mehta2014-11-061-0/+1
| | | | Change-Id: Iaa803311409cf7b649f64f69bafe2935a418d31c
* @covers tags for more test classesaddshore2013-10-241-0/+3
| | | | Change-Id: I19d49c279646a4b4c595700e53b790ba4eb9521e
* Fix scope on all /phpunit test methodsaddshore2013-10-241-1/+1
| | | | Change-Id: I3ce92463d485a0fb23e464e9a8059330f32d79af
* Deprecate MWFunction::call and ::callArrayKevin Israel2013-07-191-44/+0
| | | | | | | | These functions existed to work around a bug (fixed in PHP 5.3) and a missing feature (added in PHP 5.2) in older versions of PHP; therefore, they are no longer necessary. Change-Id: Ifebbe3d449fc57fd83f8350c28f467605c1a07b7
* Update code formattingSiebrand Mazeland2013-04-261-1/+0
| | | | Change-Id: I16a9b42651f1cfb1a70dffbb67b7b83dfeb90d03
* Update formattingSiebrand Mazeland2013-02-141-14/+13
| | | | | | 1 of n. Change-Id: I852729f08bbb0c5e39c2db44362ccdc7f59dcc08
* Clean and repair many phpunit tests (+ fix implied configuration)Timo Tijhof2012-10-091-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Followup r79523: Test that calling self:: and parent:: throws exceptionX!2011-01-031-0/+16
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/79529
* Move wfCreateObject to MWFunction::newObj. This uses the ReflectionClass toX!2011-01-031-8/+44
| | | | | | | | | instantiate a variable-length constructor in php 5.1.3 and up, and falls back to the old, ugly, manual method that was in the old wfCreateObject function. The instances in the core have been replaced. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/79504
* Per my comment on r68760: Make MWfunction class, complete with ↵X!2011-01-021-0/+34
call_user_func helper functions that automatically make the callback PHP 5.1 compatible with the Class::Method syntax. Add Unit tests to supplement it. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/79479