From: Antoine Musso Date: Fri, 13 Apr 2012 10:47:19 +0000 (+0200) Subject: MockOutputPage class in its own file X-Git-Tag: 1.31.0-rc.0~23914^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=2389ec71413091e96d3feff06c35b8f78286fd42;p=lhc%2Fweb%2Fwiklou.git MockOutputPage class in its own file The MockOutputPage can be needed in various tests suite beside GlobalFunctions. Seems to make sense to get it in its own class so we can easily use it. Change-Id: Icbb34db81e8cc8636d95f6326dd228bc74a741d7 --- diff --git a/tests/TestsAutoLoader.php b/tests/TestsAutoLoader.php index 83015581b4..2ea4924dd7 100644 --- a/tests/TestsAutoLoader.php +++ b/tests/TestsAutoLoader.php @@ -13,6 +13,7 @@ $wgAutoloadClasses += array( //includes 'BlockTest' => "$testFolder/phpunit/includes/BlockTest.php", + 'MockOutputPage' => "$testFolder/phpunit/includes/MockOutputPage.php", //API 'ApiFormatTestBase' => "$testFolder/phpunit/includes/api/format/ApiFormatTestBase.php", diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php index a12410c7c6..94158bfd2a 100644 --- a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php +++ b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php @@ -622,13 +622,3 @@ class GlobalTest extends MediaWikiTestCase { /* TODO: many more! */ } - -class MockOutputPage { - - public $message; - - function debug( $message ) { - $this->message = "JAJA is a stupid error message. Anyway, here's your message: $message"; - } -} - diff --git a/tests/phpunit/includes/MockOutputPage.php b/tests/phpunit/includes/MockOutputPage.php new file mode 100644 index 0000000000..bdee4832bf --- /dev/null +++ b/tests/phpunit/includes/MockOutputPage.php @@ -0,0 +1,10 @@ +message = "JAJA is a stupid error message. Anyway, here's your message: $message"; + } +}