/** * @covers ::toBiasedDisjunction */ public function test_toBiasedDisjunction($value = true) { $result = testSubject::of($value)->toBiasedDisjunction(); self::assertInstanceOf(P\BiasedDisjunctionInterface::class, $result); self::assertInstanceOf(P\RightHandSideType::class, $result); self::assertSame($value, $result->merge()); }
/** * @covers ::ofRight */ public function test_right_applicative($value = 1) { self::assertEquals(rhs::of($value), testSubject::ofRight($value)); }
/** * @covers ::flattenLeft */ public function test_flattenLeft($value = true) { $left = testSubject::of($value); $right = oppositeSubject::of($value); self::assertSame($left, testNew($left)->flattenLeft()); self::assertSame($right, testNew($right)->flattenLeft()); }