From 9f58d49a27891aa96e65c2b7d02c0a647af1d352 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 29 Jan 2015 12:10:08 -0800 Subject: [PATCH] DeferredStringifier: Clean up comments and indentation in tests Change-Id: Ifdf2fe711a0be495465255c6fabb55fe34b79b27 --- includes/libs/DeferredStringifier.php | 4 +++- .../includes/libs/DeferredStringifierTest.php | 23 ++++++++++++++----- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/includes/libs/DeferredStringifier.php b/includes/libs/DeferredStringifier.php index bd32949833..a6fd11a433 100644 --- a/includes/libs/DeferredStringifier.php +++ b/includes/libs/DeferredStringifier.php @@ -26,8 +26,10 @@ class DeferredStringifier { /** @var callable Callback used for result string generation */ private $callback; + /** @var array */ private $params; + /** @var string */ private $result; @@ -42,7 +44,7 @@ class DeferredStringifier { } /** - * Returns a string generated by callback + * Get the string generated from the callback * * @return string */ diff --git a/tests/phpunit/includes/libs/DeferredStringifierTest.php b/tests/phpunit/includes/libs/DeferredStringifierTest.php index 9aaf113456..8b7610ae7b 100644 --- a/tests/phpunit/includes/libs/DeferredStringifierTest.php +++ b/tests/phpunit/includes/libs/DeferredStringifierTest.php @@ -15,13 +15,24 @@ class DeferredStringifierTest extends PHPUnit_Framework_TestCase { public static function provideToString() { return array( // No args - array( array( function() { - return 'foo'; - } ), 'foo' ), + array( + array( + function() { + return 'foo'; + } + ), + 'foo' + ), // Has args - array( array( function( $i ) { - return $i; - }, 'bar' ), 'bar' ), + array( + array( + function( $i ) { + return $i; + }, + 'bar' + ), + 'bar' + ), ); } -- 2.20.1