Skip to content

Commit

Permalink
Merge pull request #48 from tienvx/add-valid-field
Browse files Browse the repository at this point in the history
test: Add valid field when checking other invalid field
  • Loading branch information
tienvx authored Mar 30, 2024
2 parents 02bedab + fc1739e commit e30028e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/Application/Controller/MessagesControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function testMissingOrInvalidProviderStates(mixed $value): void
{
$client = static::createClient();
$client->request('POST', '/test-pact-messages', [], [], [], json_encode([
'description' => 'has message',
'providerStates' => $value,
]));
$this->assertResponseStatusCodeSame(400);
Expand All @@ -45,6 +46,7 @@ public function testMissingProviderStateName(): void
{
$client = static::createClient();
$client->request('POST', '/test-pact-messages', [], [], [], json_encode([
'description' => 'has message',
'providerStates' => [
[
'params' => [
Expand All @@ -61,6 +63,7 @@ public function testInvalidProviderStateName(): void
{
$client = static::createClient();
$client->request('POST', '/test-pact-messages', [], [], [], json_encode([
'description' => 'has message',
'providerStates' => [
[
'name' => 123,
Expand All @@ -78,6 +81,7 @@ public function testInvalidProviderStateParams(): void
{
$client = static::createClient();
$client->request('POST', '/test-pact-messages', [], [], [], json_encode([
'description' => 'has message',
'providerStates' => [
[
'name' => 'required state',
Expand Down

0 comments on commit e30028e

Please sign in to comment.