From 17b76a979e29098fc4cbd63cf3a0d3888fa95bfc Mon Sep 17 00:00:00 2001 From: Mikhail Samarkin Date: Wed, 7 Oct 2020 16:26:45 +0400 Subject: [PATCH 1/2] Add setScenarioState to module --- src/Module/Phiremock.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Module/Phiremock.php b/src/Module/Phiremock.php index 63cadf4..69a7544 100644 --- a/src/Module/Phiremock.php +++ b/src/Module/Phiremock.php @@ -25,6 +25,7 @@ use Mcustiel\Phiremock\Client\Phiremock as PhiremockClient; use Mcustiel\Phiremock\Client\Utils\RequestBuilder; use Mcustiel\Phiremock\Domain\Expectation; +use Mcustiel\Phiremock\Domain\ScenarioState; class Phiremock extends CodeceptionModule { @@ -122,4 +123,10 @@ public function grabRequestsMadeToRemoteService(RequestBuilder $builder) { return $this->phiremock->listExecutions($builder); } + + public function setScenarioState(string $name, string $state): void + { + $scenarioState = new ScenarioState($name, $state); + $this->phiremock->setScenarioState($scenarioState); + } } From 6649b43e1db6a08577f498ceca8909a7a8da6033 Mon Sep 17 00:00:00 2001 From: Mikhail Samarkin Date: Thu, 8 Oct 2020 08:33:13 +0400 Subject: [PATCH 2/2] Remove type hints --- src/Module/Phiremock.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Module/Phiremock.php b/src/Module/Phiremock.php index 69a7544..97c58f0 100644 --- a/src/Module/Phiremock.php +++ b/src/Module/Phiremock.php @@ -124,7 +124,11 @@ public function grabRequestsMadeToRemoteService(RequestBuilder $builder) return $this->phiremock->listExecutions($builder); } - public function setScenarioState(string $name, string $state): void + /** + * @param string $name + * @param string $state + */ + public function setScenarioState($name, $state) { $scenarioState = new ScenarioState($name, $state); $this->phiremock->setScenarioState($scenarioState);