/** * @dataProvider provideFunctorTestData */ public function test_it_should_obey_functor_laws(callable $f, callable $g, Functor $x) { FunctorLaws::test(f\curryN(3, [$this, 'assertEquals']), $f, $g, $x); }
/** * @dataProvider provideFunctorTestData */ public function test_it_should_obey_functor_laws(callable $f, callable $g, Functor $x, $reader) { FunctorLaws::test(function (Reader $a, Reader $b, $message) use($reader) { $this->assertEquals($a->runReader($reader), $b->runReader($reader), $message); }, $f, $g, $x); }
/** * @dataProvider provideFunctorTestData */ public function test_it_should_obey_functor_laws(callable $f, callable $g, Functor $x) { FunctorLaws::test(function (Writer $a, Writer $b, $message) { $this->assertEquals($a->runWriter(), $b->runWriter(), $message); }, $f, $g, $x); }
/** * @dataProvider provideFunctorTestData */ public function test_it_should_obey_functor_laws(callable $f, callable $g, Functor $x, $state) { FunctorLaws::test(function (State $a, State $b, $message) use($state) { $this->assertEquals($a->runState($state), $b->runState($state), $message); }, $f, $g, $x); }