/** * @BeforeFeature */ public static function setupFeature(BeforeFeatureScope $scope) { $feature = $scope->getFeature(); if ($feature->getTitle() == 'Dkan Harvest') { module_enable(array('dkan_harvest_test')); } }
/** @BeforeFeature */ public static function setupFeature(BeforeFeatureScope $scope) { if ($scope->getSuite()->getSetting('seed_data')) { echo 'setting up database'; //call sh script or command echo 'finished setup database'; } }
/** * Gives access to moodle codebase, to keep track of feature start time. * * @param BeforeFeatureScope $scope scope passed by event fired before feature. * @BeforeFeature */ public static function before_feature(BeforeFeatureScope $scope) { if (!defined('BEHAT_FEATURE_TIMING_FILE')) { return; } $file = $scope->getFeature()->getFile(); self::$timings[$file] = microtime(true); }
/** * @param Scope\BeforeFeatureScope $scope * Scope of the processing feature. * * @BeforeFeature */ public static function beforeFeature(Scope\BeforeFeatureScope $scope) { self::collectTags($scope->getFeature()->getTags()); // Database will be cloned for every feature with @cloneDB tag. if (self::hasTag('clonedb')) { self::$database = clone new Database(self::getTag('clonedb', 'default')); } }