File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ class ConcatTest extends TestCase
1414{
1515 public function testInterface ()
1616 {
17- $ this ->assertInstanceOf (Monoid::class, new Concat );
17+ $ this ->assertInstanceOf (Monoid::class, Concat::monoid );
1818 }
1919
2020 public function testCombine ()
2121 {
22- $ str = ( new Concat ) ->combine (Str::of ('foo ' ), Str::of ('bar ' ));
22+ $ str = Concat::monoid ->combine (Str::of ('foo ' ), Str::of ('bar ' ));
2323
2424 $ this ->assertInstanceOf (Str::class, $ str );
2525 $ this ->assertSame (
Original file line number Diff line number Diff line change @@ -852,12 +852,12 @@ public function testLazyMatch()
852852
853853 public function testFold ()
854854 {
855- $ str = Sequence::of (Str::of ('foo ' ), Str::of ('bar ' ), Str::of ('baz ' ))->fold (new Concat );
855+ $ str = Sequence::of (Str::of ('foo ' ), Str::of ('bar ' ), Str::of ('baz ' ))->fold (Concat::monoid );
856856
857857 $ this ->assertInstanceOf (Str::class, $ str );
858858 $ this ->assertSame ('foobarbaz ' , $ str ->toString ());
859859
860- $ str = Sequence::of (Str::of ('baz ' ), Str::of ('foo ' ), Str::of ('bar ' ))->fold (new Concat );
860+ $ str = Sequence::of (Str::of ('baz ' ), Str::of ('foo ' ), Str::of ('bar ' ))->fold (Concat::monoid );
861861
862862 $ this ->assertInstanceOf (Str::class, $ str );
863863 $ this ->assertSame ('bazfoobar ' , $ str ->toString ());
You can’t perform that action at this time.
0 commit comments