示例#1
0
 /**
  *
  * @param \Mcustiel\Phiremock\Domain\Expectation $foundExpectation
  */
 private function processScenario($foundExpectation)
 {
     if ($foundExpectation->getNewScenarioState()) {
         if (!$foundExpectation->getScenarioName()) {
             throw new \RuntimeException('Expecting scenario state without specifying scenario name');
         }
         $this->scenarioStorage->setScenarioState($foundExpectation->getScenarioName(), $foundExpectation->getNewScenarioState());
     }
 }
 private function isExpectedScenarioState(Expectation $expectation)
 {
     if ($expectation->getScenarioStateIs()) {
         $this->checkScenarioNameOrThrowException($expectation);
         $this->logger->debug('Checking scenario state again expectation');
         $scenarioState = $this->scenarioStorage->getScenarioState($expectation->getScenarioName());
         if ($expectation->getScenarioStateIs() != $scenarioState) {
             return false;
         }
     }
     return true;
 }