From d11e2c18ce07e00f05ac3f2d76a0c3f488098ef8 Mon Sep 17 00:00:00 2001 From: addshore Date: Sat, 25 Jan 2014 16:14:49 +0100 Subject: [PATCH] +Test for Status->CleanParams with a callback Change-Id: I4e7570ea041d28303388c630b3ca07225faf8551 --- tests/phpunit/includes/StatusTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/includes/StatusTest.php b/tests/phpunit/includes/StatusTest.php index 08c1470b09..2ba804f5ce 100644 --- a/tests/phpunit/includes/StatusTest.php +++ b/tests/phpunit/includes/StatusTest.php @@ -276,12 +276,14 @@ class StatusTest extends MediaWikiLangTestCase { $this->assertEquals( $expected, $method->invoke( $status, $params ) ); } - /** - * @todo test cleanParams with a callback - */ public static function provideCleanParams() { + $cleanCallback = function( $value ) { + return '-' . $value . '-'; + }; + return array( array( false, array( 'foo' => 'bar' ), array( 'foo' => 'bar' ) ), + array( $cleanCallback, array( 'foo' => 'bar' ), array( 'foo' => '-bar-' ) ), ); } -- 2.20.1