Merge "Add @covers tags for more tests"
[lhc/web/wiklou.git] / tests / phpunit / includes / libs / DeferredStringifierTest.php
index 8b7610a..19dc53c 100644 (file)
@@ -1,9 +1,13 @@
 <?php
 
+/**
+ * @covers DeferredStringifier
+ */
 class DeferredStringifierTest extends PHPUnit_Framework_TestCase {
 
+       use MediaWikiCoversValidator;
+
        /**
-        * @covers DeferredStringifier
         * @dataProvider provideToString
         */
        public function testToString( $params, $expected ) {
@@ -13,27 +17,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 +45,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