/**
  * @dataProvider provideApplicativeTestData
  */
 public function test_it_should_obey_applicative_laws(Applicative $u, Applicative $v, Applicative $w, callable $f, $x)
 {
     ApplicativeLaws::test(f\curryN(3, [$this, 'assertEquals']), f\curryN(1, Identity::of), $u, $v, $w, $f, $x);
 }
 /**
  * @dataProvider provideApplicativeTestData
  */
 public function test_it_should_obey_applicative_laws($pure, Applicative $u, Applicative $v, Applicative $w, callable $f, $x, $reader)
 {
     ApplicativeLaws::test(function (Reader $a, Reader $b, $message) use($reader) {
         $this->assertEquals($a->runReader($reader), $b->runReader($reader), $message);
     }, $pure, $u, $v, $w, $f, $x);
 }
 /**
  * @dataProvider provideApplicativeTestData
  */
 public function test_it_should_obey_applicative_laws($pure, Applicative $u, Applicative $v, Applicative $w, callable $f, $x)
 {
     ApplicativeLaws::test(function (Writer $a, Writer $b, $message) {
         $this->assertEquals($a->runWriter(), $b->runWriter(), $message);
     }, $pure, $u, $v, $w, $f, $x);
 }
Beispiel #4
0
 /**
  * @dataProvider provideApplicativeTestData
  */
 public function test_it_should_obey_applicative_laws($pure, Applicative $u, Applicative $v, Applicative $w, callable $f, $x, $state)
 {
     ApplicativeLaws::test(function (State $a, State $b, $message) use($state) {
         $this->assertEquals($a->runState($state), $b->runState($state), $message);
     }, f\curryN(1, $pure), $u, $v, $w, $f, $x);
 }