From d7035099c00ea4a17b8694e3b9ed536fb1a1cb7d Mon Sep 17 00:00:00 2001 From: Khaled AbdElRahim Date: Sun, 18 Apr 2021 05:41:23 +0200 Subject: [PATCH 1/3] Fix optional parameter issue --- src/Assert/AssertFields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Assert/AssertFields.php b/src/Assert/AssertFields.php index cd2feae..de15397 100644 --- a/src/Assert/AssertFields.php +++ b/src/Assert/AssertFields.php @@ -44,7 +44,7 @@ public function assertFieldsExclude($attribute, $value=null) return $this->fieldCheck($attribute, 'assertJsonMissing', $value); } - protected function fieldCheck($attribute, $method, $value = null) + protected function fieldCheck($attribute, $value, $method = null) { if ($attribute instanceof Collection) { $attribute = $attribute->toArray(); From d57ef44d7bc077d4fac62961cc3cb32476a8e501 Mon Sep 17 00:00:00 2001 From: Khaled AbdElRahim Date: Fri, 23 Apr 2021 20:48:34 +0200 Subject: [PATCH 2/3] renam package --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 78e8538..f0f93c7 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "dillingham/nova-assertions", + "name": "khaled-dev/nova-assertions", "description": "Nova api testing requests & assertions", "type": "library", "license": "MIT", From c03fbbe95aee859b2ba1c29ce4d4b18ca9995213 Mon Sep 17 00:00:00 2001 From: Khaled AbdElRahim Date: Sat, 24 Apr 2021 06:00:23 +0200 Subject: [PATCH 3/3] Fix Fields Include/Exclude issue --- src/Assert/AssertFields.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Assert/AssertFields.php b/src/Assert/AssertFields.php index de15397..b28cf3c 100644 --- a/src/Assert/AssertFields.php +++ b/src/Assert/AssertFields.php @@ -36,12 +36,12 @@ public function assertFields(closure $callable) public function assertFieldsInclude($attribute, $value=null) { - return $this->fieldCheck($attribute, 'assertJsonFragment', $value); + return $this->fieldCheck($attribute, $value, 'assertJsonFragment'); } public function assertFieldsExclude($attribute, $value=null) { - return $this->fieldCheck($attribute, 'assertJsonMissing', $value); + return $this->fieldCheck($attribute, $value, 'assertJsonMissing'); } protected function fieldCheck($attribute, $value, $method = null)