Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setScenarioState to module #38

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}