예제 #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());
     }
 }
예제 #2
0
 protected function validateScenarioNameOrThrowException(Expectation $expectation, LoggerInterface $logger)
 {
     if (!$expectation->getScenarioName() && ($expectation->getScenarioStateIs() || $expectation->getNewScenarioState())) {
         $logger->error('Scenario name related misconfiguration');
         throw new \RuntimeException('Expecting or trying to set scenario state without specifying scenario name');
     }
 }
 private function checkScenarioNameOrThrowException(Expectation $expectation)
 {
     if (!$expectation->getScenarioName()) {
         throw new \RuntimeException('Expecting scenario state without specifying scenario name');
     }
 }