Beispiel #1
0
 /**
  * @covers ::ofLeft
  */
 public function test_left_applicative($value = 1)
 {
     $result = testSubject::ofLeft($value);
     self::assertTrue($result->isLeft());
     self::assertInstanceOf(testSubject::class, $result);
     self::assertInstanceOf(lhs::class, $result);
     self::assertEquals(lhs::of($value), $result);
 }
Beispiel #2
0
 /** @covers ::of */
 public function test_applicative($value = 1)
 {
     $subject = testSubject::of($value);
     self::assertInstanceOf(testSubject::class, $subject);
     self::assertEquals(new testSubject($value), $subject);
 }