예제 #1
0
 /**
  * @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);
 }
예제 #2
0
 /**
  * @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());
 }