DeferredStringifier: Clean up comments and indentation in tests
Change-Id: Ifdf2fe711a0be495465255c6fabb55fe34b79b27
This commit is contained in:
parent
9b62a6ad80
commit
9f58d49a27
2 changed files with 20 additions and 7 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue