I try to find a way to skip scenarios in the FeatureContext.php. I got a test which i only will execute if a Condition is right, else der just will be skipped. My idea was to check the scenario with a tag like "@weeksale"
@weeksale
Scenario: test
Given I go to "/"
Then I should see "Unsere Leistungen"
And in my FeatureContext I got a Condition and if its false they just Skipped
/**
* @beforeScenario
* @weeksale
*
* @param Behat\Behat\Event\ScenarioEvent $event
*/
public function weekSaleInTime($event)
{
$dateUrl = $this->parameters['weekSaleDatePage'];
$date = file_get_contents($dateUrl);
$dateArray = explode("\r\n", $date);
$result = $this->isCurrentDateBetween($dateArray[0], $dateArray[1]);
if($result == false)
{
//behat skip this scenario
}
anyone an idea how i can tell behat to skip a Scenario?
(behat v2.5.5)