Skip to content

Commit

Permalink
Add setScenarioState to module (#38)
Browse files Browse the repository at this point in the history
* Add setScenarioState to module
* Remove type hints
  • Loading branch information
mikhailsamarkin authored Oct 8, 2020
1 parent 56f5f9e commit 20ed813
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Module/Phiremock.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -122,4 +123,14 @@ public function grabRequestsMadeToRemoteService(RequestBuilder $builder)
{
return $this->phiremock->listExecutions($builder);
}

/**
* @param string $name
* @param string $state
*/
public function setScenarioState($name, $state)
{
$scenarioState = new ScenarioState($name, $state);
$this->phiremock->setScenarioState($scenarioState);
}
}

0 comments on commit 20ed813

Please sign in to comment.