Exemplo n.º 1
0
 /**
  * @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());
 }
Exemplo n.º 2
0
 /**
  * @covers ::ofRight
  */
 public function test_right_applicative($value = 1)
 {
     self::assertEquals(rhs::of($value), testSubject::ofRight($value));
 }
Exemplo n.º 3
0
 /**
  * @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());
 }