/** * @covers ::ofRight */ public function test_right_applicative($value = 1) { $result = testSubject::ofRight($value); self::assertTrue($result->isRight()); self::assertInstanceOf(testSubject::class, $result); self::assertInstanceOf(rhs::class, $result); self::assertEquals(rhs::of($value), $result); }
/** * @covers ::flatten */ public function test_flatten() { $self = testNew(null); $sibling = testSubject::ofLeft(null); self::assertSame($self, testNew($self)->flatten()); self::assertSame($sibling, testNew($sibling)->flatten()); }