X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flibs%2FDeferredStringifierTest.php;h=c3a1285e8e7ddfc4bb8ce31ba7d6f9f051ce11bd;hp=8b7610ae7b76caebd7ddc350009d426086bff83f;hb=dbad540cd37617879aff6f28ce9c016dd8049d4e;hpb=96366c1cf1966ca07e8f0b4361bbca28bfaf43a0 diff --git a/tests/phpunit/includes/libs/DeferredStringifierTest.php b/tests/phpunit/includes/libs/DeferredStringifierTest.php index 8b7610ae7b..c3a1285e8e 100644 --- a/tests/phpunit/includes/libs/DeferredStringifierTest.php +++ b/tests/phpunit/includes/libs/DeferredStringifierTest.php @@ -2,6 +2,8 @@ class DeferredStringifierTest extends PHPUnit_Framework_TestCase { + use MediaWikiCoversValidator; + /** * @covers DeferredStringifier * @dataProvider provideToString @@ -13,27 +15,27 @@ class DeferredStringifierTest extends PHPUnit_Framework_TestCase { } public static function provideToString() { - return array( + return [ // No args - array( - array( - function() { + [ + [ + function () { return 'foo'; } - ), + ], 'foo' - ), + ], // Has args - array( - array( - function( $i ) { + [ + [ + function ( $i ) { return $i; }, 'bar' - ), + ], 'bar' - ), - ); + ], + ]; } /** @@ -41,7 +43,7 @@ class DeferredStringifierTest extends PHPUnit_Framework_TestCase { * it is never converted to a string */ public function testCallbackNotCalled() { - $ds = new DeferredStringifier( function() { + $ds = new DeferredStringifier( function () { throw new Exception( 'This should not be reached!' ); } ); // No exception was thrown