22
33namespace Ahc \Underscore \Tests ;
44
5- class UnderscoreFunctionTest extends \PHPUnit_Framework_TestCase
5+ use PHPUnit \Framework \TestCase ;
6+
7+ class UnderscoreFunctionTest extends TestCase
68{
79 public function test_memoize ()
810 {
@@ -27,10 +29,14 @@ public function test_memoize()
2729
2830 $ buffer = ob_get_clean ();
2931
30- $ this ->assertSame (1 , substr_count ($ buffer , 'sum 1 + 2 ' ),
32+ $ this ->assertSame (
33+ 1 ,
34+ substr_count ($ buffer , 'sum 1 + 2 ' ),
3135 'Should be called only once, subsequent calls uses memo '
3236 );
33- $ this ->assertSame (1 , substr_count ($ buffer , 'sum 3 + 2 ' ),
37+ $ this ->assertSame (
38+ 1 ,
39+ substr_count ($ buffer , 'sum 3 + 2 ' ),
3440 'Should be called only once, subsequent calls uses memo '
3541 );
3642 }
@@ -76,7 +82,9 @@ public function test_throttle()
7682
7783 $ buffer = ob_get_clean ();
7884
79- $ this ->assertLessThanOrEqual (3 , substr_count ($ buffer , 'throttle ' ),
85+ $ this ->assertLessThanOrEqual (
86+ 3 ,
87+ substr_count ($ buffer , 'throttle ' ),
8088 'Should be called only once, subsequent calls uses memo '
8189 );
8290 }
0 commit comments