original_string: public function get_config_file_contents($features = '', $contexts = '', $tags = '', $parallelruns = 0, $currentrun = 0) {
          global $CFG;
  
          // Set current run and parallel run.
          if (!empty($parallelruns) && !empty($currentrun)) {
              $this->set_parallel_run($parallelruns, $currentrun);
          }
  
          // If tags defined then use them. This is for BC.
          if (!empty($tags)) {
              $this->set_tag_for_feature_filter($tags);
          }
  
          // If features not passed then get it. Empty array means we don't need to include features.
          if (empty($features) && !is_array($features)) {
              $features = $this->get_components_features();
          } else {
              $this->features = $features;
          }
  
          // If stepdefinitions not passed then get the list.
          if (empty($contexts)) {
              $this->get_components_contexts();
          } else {
              $this->contexts = $contexts;
          }
  
          // We require here when we are sure behat dependencies are available.
          require_once($CFG->dirroot . '/vendor/autoload.php');
  
          $config = $this->build_config();
  
          $config = $this->merge_behat_config($config);
  
          $config = $this->merge_behat_profiles($config);
  
          // Return config array for phpunit, so it can be tested.
          if (defined('PHPUNIT_TEST') && PHPUNIT_TEST) {
              return $config;
          }
  
          return Symfony\Component\Yaml\Yaml::dump($config, 10, 2);
      }
code: public function get_config_file_contents($features = '', $contexts = '', $tags = '', $parallelruns = 0, $currentrun = 0) {
          global $CFG;
  
          // Set current run and parallel run.
          if (!empty($parallelruns) && !empty($currentrun)) {
              $this->set_parallel_run($parallelruns, $currentrun);
          }
  
          // If tags defined then use them. This is for BC.
          if (!empty($tags)) {
              $this->set_tag_for_feature_filter($tags);
          }
  
          // If features not passed then get it. Empty array means we don't need to include features.
          if (empty($features) && !is_array($features)) {
              $features = $this->get_components_features();
          } else {
              $this->features = $features;
          }
  
          // If stepdefinitions not passed then get the list.
          if (empty($contexts)) {
              $this->get_components_contexts();
          } else {
              $this->contexts = $contexts;
          }
  
          // We require here when we are sure behat dependencies are available.
          require_once($CFG->dirroot . '/vendor/autoload.php');
  
          $config = $this->build_config();
  
          $config = $this->merge_behat_config($config);
  
          $config = $this->merge_behat_profiles($config);
  
          // Return config array for phpunit, so it can be tested.
          if (defined('PHPUNIT_TEST') && PHPUNIT_TEST) {
              return $config;
          }
  
          return Symfony\Component\Yaml\Yaml::dump($config, 10, 2);
      }
code_tokens: public function get_config_file_contents ( $ features = '' , $ contexts = '' , $ tags = '' , $ parallelruns = 0 , $ currentrun = 0 ) { global $ CFG ; // Set current run and parallel run. if ( ! empty ( $ parallelruns ) && ! empty ( $ currentrun ) ) { $ this -> set_parallel_run ( $ parallelruns , $ currentrun ) ; } // If tags defined then use them. This is for BC. if ( ! empty ( $ tags ) ) { $ this -> set_tag_for_feature_filter ( $ tags ) ; } // If features not passed then get it. Empty array means we don't need to include features. if ( empty ( $ features ) && ! is_array ( $ features ) ) { $ features = $ this -> get_components_features ( ) ; } else { $ this -> features = $ features ; } // If stepdefinitions not passed then get the list. if ( empty ( $ contexts ) ) { $ this -> get_components_contexts ( ) ; } else { $ this -> contexts = $ contexts ; } // We require here when we are sure behat dependencies are available. require_once ( $ CFG -> dirroot . '/vendor/autoload.php' ) ; $ config = $ this -> build_config ( ) ; $ config = $ this -> merge_behat_config ( $ config ) ; $ config = $ this -> merge_behat_profiles ( $ config ) ; // Return config array for phpunit, so it can be tested. if ( defined ( 'PHPUNIT_TEST' ) && PHPUNIT_TEST ) { return $ config ; } return Symfony \ Component \ Yaml \ Yaml :: dump ( $ config , 10 , 2 ) ; }
docstring: Behat config file specifing the main context class,
  the required Behat extensions and Moodle test wwwroot.
  
  @param array $features The system feature files
  @param array $contexts The system steps definitions
  @param string $tags filter features with specified tags.
  @param int $parallelruns number of parallel runs.
  @param int $currentrun current run for which config file is needed.
  @return string
docstring_tokens: Behat config file specifing the main context class the required Behat extensions and Moodle test wwwroot .