remove curry from laws tests
authorwidmogrod <widmogrod@gmail.com>
Thu, 28 Dec 2017 23:18:21 +0000 (00:18 +0100)
committerwidmogrod <widmogrod@gmail.com>
Thu, 28 Dec 2017 23:18:21 +0000 (00:18 +0100)
test/Monad/EitherTest.php
test/Monad/IdentityTest.php
test/Monad/MaybeTest.php
test/Primitive/ListtTest.php
test/Primitive/NumTest.php
test/Primitive/ProductTest.php
test/Primitive/SumTest.php

index 48c2039..af9d100 100644 (file)
@@ -22,7 +22,7 @@ class EitherTest extends \PHPUnit\Framework\TestCase
     public function test_if_maybe_monad_obeys_the_laws($return, $f, $g, $x)
     {
         MonadLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             f\curryN(1, $return),
             $f,
             $g,
@@ -69,7 +69,7 @@ class EitherTest extends \PHPUnit\Framework\TestCase
         $x
     ) {
         ApplicativeLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             f\curryN(1, $pure),
             $u,
             $v,
@@ -126,7 +126,7 @@ class EitherTest extends \PHPUnit\Framework\TestCase
         Functor $x
     ) {
         FunctorLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             $f,
             $g,
             $x
index a5617ce..8739424 100644 (file)
@@ -20,7 +20,7 @@ class IdentityTest extends \PHPUnit\Framework\TestCase
     public function test_if_identity_monad_obeys_the_laws($f, $g, $x)
     {
         MonadLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             f\curryN(1, Identity::of),
             $f,
             $g,
@@ -57,7 +57,7 @@ class IdentityTest extends \PHPUnit\Framework\TestCase
         $x
     ) {
         ApplicativeLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             f\curryN(1, Identity::of),
             $u,
             $v,
@@ -97,7 +97,7 @@ class IdentityTest extends \PHPUnit\Framework\TestCase
         Functor $x
     ) {
         FunctorLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             $f,
             $g,
             $x
index ab23ef8..be8d685 100644 (file)
@@ -24,7 +24,7 @@ class MaybeTest extends \PHPUnit\Framework\TestCase
     public function test_if_maybe_monad_obeys_the_laws($return, $f, $g, $x)
     {
         MonadLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             f\curryN(1, $return),
             $f,
             $g,
@@ -70,7 +70,7 @@ class MaybeTest extends \PHPUnit\Framework\TestCase
         $x
     ) {
         ApplicativeLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             f\curryN(1, $pure),
             $u,
             $v,
@@ -124,7 +124,7 @@ class MaybeTest extends \PHPUnit\Framework\TestCase
     public function test_it_should_obey_monoid_laws($x, $y, $z)
     {
         MonoidLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             $x,
             $y,
             $z
@@ -166,7 +166,7 @@ class MaybeTest extends \PHPUnit\Framework\TestCase
         Functor $x
     ) {
         FunctorLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             $f,
             $g,
             $x
index 289f41c..ae08b36 100644 (file)
@@ -28,7 +28,7 @@ class ListtTest extends \PHPUnit\Framework\TestCase
     public function test_if_list_obeys_the_laws($f, $g, $x)
     {
         MonadLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             f\curryN(1, fromValue),
             $f,
             $g,
@@ -66,7 +66,7 @@ class ListtTest extends \PHPUnit\Framework\TestCase
         $x
     ) {
         ApplicativeLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             f\curryN(1, $pure),
             $u,
             $v,
@@ -107,7 +107,7 @@ class ListtTest extends \PHPUnit\Framework\TestCase
         Functor $x
     ) {
         FunctorLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             $f,
             $g,
             $x
@@ -135,7 +135,7 @@ class ListtTest extends \PHPUnit\Framework\TestCase
     public function test_it_should_obey_monoid_laws(Monoid $x, Monoid $y, Monoid $z)
     {
         MonoidLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             $x,
             $y,
             $z
index 46e38e2..6061938 100644 (file)
@@ -4,7 +4,6 @@ declare(strict_types=1);
 
 namespace test\Primitive;
 
-use Widmogrod\Functional as f;
 use Widmogrod\Helpful\SetoidLaws;
 use Widmogrod\Primitive\Num;
 
@@ -19,7 +18,7 @@ class NumTest extends \PHPUnit\Framework\TestCase
         $c
     ) {
         SetoidLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             $a,
             $b,
             $c
index d6ec1cf..2d772e1 100644 (file)
@@ -5,7 +5,6 @@ declare(strict_types=1);
 namespace test\Primitive;
 
 use Eris\TestTrait;
-use Widmogrod\Functional as f;
 use Widmogrod\Helpful\MonoidLaws;
 use Widmogrod\Helpful\SetoidLaws;
 use Widmogrod\Primitive\Product;
@@ -24,7 +23,7 @@ class ProductTest extends \PHPUnit\Framework\TestCase
         $c
     ) {
         SetoidLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             $a,
             $b,
             $c
@@ -40,7 +39,7 @@ class ProductTest extends \PHPUnit\Framework\TestCase
         $c
     ) {
         MonoidLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             $a,
             $b,
             $c
index 12d371f..f32010a 100644 (file)
@@ -4,7 +4,6 @@ declare(strict_types=1);
 
 namespace test\Primitive;
 
-use Widmogrod\Functional as f;
 use Widmogrod\Helpful\MonoidLaws;
 use Widmogrod\Helpful\SetoidLaws;
 use Widmogrod\Primitive\Product;
@@ -21,7 +20,7 @@ class SumTest extends \PHPUnit\Framework\TestCase
         $c
     ) {
         SetoidLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             $a,
             $b,
             $c
@@ -37,7 +36,7 @@ class SumTest extends \PHPUnit\Framework\TestCase
         $c
     ) {
         MonoidLaws::test(
-            f\curryN(3, [$this, 'assertEquals']),
+            [$this, 'assertEquals'],
             $a,
             $b,
             $c