/** 
  * @AfterFeature
  */
 public static function teardownFeature(AfterFeatureScope $scope)
 {
     $feature = $scope->getFeature();
     if ($feature->getTitle() == 'Dkan Harvest') {
         module_disable(array('dkan_harvest_test'));
     }
 }
Example #2
0
 /**
  * Gives access to moodle codebase, to keep track of feature end time.
  *
  * @param AfterFeatureScope $scope scope passed by event fired after feature.
  * @AfterFeature
  */
 public static function after_feature(AfterFeatureScope $scope)
 {
     if (!defined('BEHAT_FEATURE_TIMING_FILE')) {
         return;
     }
     $file = $scope->getFeature()->getFile();
     self::$timings[$file] = microtime(true) - self::$timings[$file];
     // Probably didn't actually run this, don't output it.
     if (self::$timings[$file] < 1) {
         unset(self::$timings[$file]);
     }
 }