Ejemplo n.º 1
0
 /**
  * Test if clean features key and path is returned.
  * @dataProvider clean_features_path_list
  */
 public function test_get_clean_feature_key_and_path($featurepath, $key, $cleanfeaturepath)
 {
     global $CFG;
     // This is a hack so directory name is correctly detected in tests.
     //FIXME: MDL-55722 work out why this is necessary..
     $oldroot = $CFG->dirroot;
     $CFG->dirroot = 'C:';
     $behatconfigutil = new behat_config_util();
     // Fix expected directory path for OS.
     $cleanfeaturepath = testing_cli_fix_directory_separator($cleanfeaturepath);
     list($retkey, $retcleanfeaturepath) = $behatconfigutil->get_clean_feature_key_and_path($featurepath);
     $this->assertEquals($key, $retkey);
     $this->assertEquals($cleanfeaturepath, $retcleanfeaturepath);
     //FIXME: MDL-55722 work out why this is necessary..
     $CFG->dirroot = $oldroot;
 }