Skip to content

Commit 8180f82

Browse files
committed
fix tests
1 parent 3fe782f commit 8180f82

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/Monoid/ConcatTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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(

tests/SequenceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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());

0 commit comments

Comments
 (0)