$steps = tool_behat::stepsdefinitions($type, $component, $filter);
// Form.
-$componentswithsteps = array(
- '' => get_string('allavailablesteps', 'tool_behat'),
- 'nomoodle' => get_string('nomoodlesteps', 'tool_behat'),
-);
+$componentswithsteps = array('' => get_string('allavailablesteps', 'tool_behat'));
// Complete the components list with the moodle steps definitions.
$components = tool_behat::get_components_steps_definitions();
$string['moreinfoin'] = 'More info in';
$string['newstepsinfo'] = 'for info about adding new steps definitions';
$string['newtestsinfo'] = 'for info about writting new tests';
-$string['nomoodlesteps'] = 'Generic web application steps';
$string['nostepsdefinitions'] = 'There aren\'t steps definitions matching this filter';
$string['pluginname'] = 'Acceptance testing';
$string['phpunitenvproblem'] = 'PHPUnit environment problem';
$behatpath = $CFG->dirroot . '/lib/behat';
- // Not extra contexts when component is specified.
- $loadbuiltincontexts = '0';
- if ($component == '' || $component == 'nomoodle') {
- $loadbuiltincontexts = '1';
- }
-
// Behat config file specifing the main context class,
// the required Behat extensions and Moodle test wwwroot.
$contents = 'default:
bootstrap: ' . $behatpath . '/features/bootstrap
context:
class: behat_init_context
- parameters:
- loadbuiltincontexts: ' . $loadbuiltincontexts . '
extensions:
Behat\MinkExtension\Extension:
base_url: ' . $CFG->test_wwwroot . '
// Gets all the components with steps definitions.
$steps = self::get_components_steps_definitions();
- if ($steps && $component != 'nomoodle') {
+ if ($steps) {
$stepsdefinitions = array('');
foreach ($steps as $key => $filepath) {
if ($component == '' || $component === $key) {
* @param array $parameters context parameters (set them up through behat.yml)
*/
public function __construct(array $parameters) {
-
- // Only load all subcontext if specified.
- if ($parameters['loadbuiltincontexts']) {
- $this->useContext('mink', new MinkContext($parameters));
- }
-
$this->useContext('moodle', new MoodleContext($parameters));
}