diff --git a/src/Traits/NovaTestTrait.php b/src/Traits/NovaTestTrait.php new file mode 100644 index 0000000..19d72ae --- /dev/null +++ b/src/Traits/NovaTestTrait.php @@ -0,0 +1,15 @@ + $search, + 'filters' => base64_encode(json_encode($filters)), + 'perPage' => $perPage, + ]; + } +} diff --git a/tests/NovaTestTraitTest.php b/tests/NovaTestTraitTest.php new file mode 100644 index 0000000..851e85e --- /dev/null +++ b/tests/NovaTestTraitTest.php @@ -0,0 +1,25 @@ +novaSearchParams([ + 'Badge:kyc_status' => ['Completed'], + ]); + + $this->assertEquals($result, [ + 'search' => '', + 'filters' => 'eyJCYWRnZTpreWNfc3RhdHVzIjpbIkNvbXBsZXRlZCJdfQ==', + 'perPage' => 25, + ]); + } +}