Add SetoidLaws for Stringg
authorwidmogrod <widmogrod@gmail.com>
Thu, 21 Dec 2017 21:13:43 +0000 (22:13 +0100)
committerwidmogrod <widmogrod@gmail.com>
Thu, 21 Dec 2017 21:13:43 +0000 (22:13 +0100)
test/Primitive/StringgTest.php

index c76a22f..3f3515a 100644 (file)
@@ -5,6 +5,7 @@ namespace test\Widmogrod\Primitive;
 use Widmogrod\FantasyLand\Monoid;
 use Widmogrod\Functional as f;
 use Widmogrod\Helpful\MonoidLaws;
+use Widmogrod\Helpful\SetoidLaws;
 use Widmogrod\Primitive\Product;
 use Widmogrod\Primitive\Stringg;
 
@@ -13,6 +14,22 @@ class StringgTest extends \PHPUnit\Framework\TestCase
     /**
      * @dataProvider provideRandomizedData
      */
+    public function test_it_should_obay_setoid_laws(
+        $a,
+        $b,
+        $c
+    ) {
+        SetoidLaws::test(
+            f\curryN(3, [$this, 'assertEquals']),
+            $a,
+            $b,
+            $c
+        );
+    }
+
+    /**
+     * @dataProvider provideRandomizedData
+     */
     public function test_it_should_obey_monoid_laws(Monoid $x, Monoid $y, Monoid $z)
     {
         MonoidLaws::test(