/** 
  * @BeforeFeature
  */
 public static function setupFeature(BeforeFeatureScope $scope)
 {
     $feature = $scope->getFeature();
     if ($feature->getTitle() == 'Dkan Harvest') {
         module_enable(array('dkan_harvest_test'));
     }
 }
Пример #2
0
 /**
  * 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);
 }
Пример #3
0
 /**
  * @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'));
     }
 }