+Test for Status->CleanParams with a callback
authoraddshore <addshorewiki@gmail.com>
Sat, 25 Jan 2014 15:14:49 +0000 (16:14 +0100)
committeraddshore <addshorewiki@gmail.com>
Sat, 25 Jan 2014 15:14:49 +0000 (16:14 +0100)
Change-Id: I4e7570ea041d28303388c630b3ca07225faf8551

tests/phpunit/includes/StatusTest.php

index 08c1470..2ba804f 100644 (file)
@@ -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-' ) ),
                );
        }