Exemple #1
0
 /**
  * @covers ::flattenRight
  */
 public function test_flattenRight($value = true)
 {
     $left = oppositeSubject::of($value);
     $right = testSubject::of($value);
     self::assertSame($left, testNew($left)->flattenRight());
     self::assertSame($right, testNew($right)->flattenRight());
 }
Exemple #2
0
 /**
  * @covers ::ofLeft
  */
 public function test_left_applicative($value = 1)
 {
     self::assertEquals(lhs::of($value), testSubject::ofLeft($value));
 }
Exemple #3
0
 /**
  * @covers ::toBiasedDisjunction
  */
 public function test_toBiasedDisjunction($value = true)
 {
     $result = testSubject::of($value)->toBiasedDisjunction();
     self::assertInstanceOf(P\BiasedDisjunctionInterface::class, $result);
     self::assertInstanceOf(P\LeftHandSideType::class, $result);
     self::assertSame($value, $result->merge());
 }