/** * @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 ::of */ public function test_applicative($value = 1) { $disjunction = testSubject::of($value); self::assertInstanceOf(testSubject::class, $disjunction); self::assertSame($value, $disjunction->merge()); }