/** * @BeforeScenario */ public static function setupFeature($event) { include_once realpath(__DIR__ . '/../CiHelper.php'); CiHelper::run($event); }
public static function run($event) { if (!self::isInternalCI()) { return; } if ($event instanceof ScenarioEvent && in_array("keep", $event->getScenario()->getOwnTags())) { if (self::state() === false) { self::StartDB(); } // echo "\033[36m > " . strtr("Keeping the DB instance ...", array("\n" => "\n > ")) . "\033[0m\n"; return; } self::StopDB(self::$lastContainerId); self::$lastContainerId = self::StartDB(); }