示例#1
0
 /**
  * @BeforeScenario
  */
 public static function setupFeature($event)
 {
     include_once realpath(__DIR__ . '/../CiHelper.php');
     CiHelper::run($event);
 }
示例#2
0
 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();
 }