Skip to content

Commit

Permalink
[Behat] Add possibility to accepting null as value in response checker
Browse files Browse the repository at this point in the history
  • Loading branch information
GSadee committed May 17, 2024
1 parent 68da42b commit 71ff79c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Sylius/Behat/Client/ResponseChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function isUpdateSuccessful(Response $response): bool
return $response->getStatusCode() === Response::HTTP_OK;
}

public function hasValue(Response $response, string $key, bool|int|string $value): bool
public function hasValue(Response $response, string $key, bool|int|string|null $value): bool
{
return $this->getResponseContentValue($response, $key) === $value;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Sylius/Behat/Client/ResponseCheckerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function hasAccessDenied(Response $response): bool;

public function hasCollection(Response $response): bool;

public function hasValue(Response $response, string $key, bool|int|string $value): bool;
public function hasValue(Response $response, string $key, bool|int|string|null $value): bool;

public function hasValueInCollection(Response $response, string $key, int|string $value): bool;

Expand Down

0 comments on commit 71ff79c

Please sign in to comment.