From 2389ec71413091e96d3feff06c35b8f78286fd42 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Fri, 13 Apr 2012 12:47:19 +0200 Subject: [PATCH] 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 --- tests/TestsAutoLoader.php | 1 + tests/phpunit/includes/GlobalFunctions/GlobalTest.php | 10 ---------- tests/phpunit/includes/MockOutputPage.php | 10 ++++++++++ 3 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 tests/phpunit/includes/MockOutputPage.php 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"; + } +} -- 2.20.1