Commit 6d9427bb authored by David Monllaó's avatar David Monllaó
Browse files

MDL-37046 behat: Removing MinkContext

parent de424b46
......@@ -36,10 +36,7 @@ admin_externalpage_setup('toolbehat');
$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();
......
......@@ -29,7 +29,6 @@ $string['installinfo'] = 'for installation and tests execution info';
$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';
......
......@@ -190,12 +190,6 @@ class tool_behat {
$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:
......@@ -204,8 +198,6 @@ class tool_behat {
bootstrap: ' . $behatpath . '/features/bootstrap
context:
class: behat_init_context
parameters:
loadbuiltincontexts: ' . $loadbuiltincontexts . '
extensions:
Behat\MinkExtension\Extension:
base_url: ' . $CFG->test_wwwroot . '
......@@ -230,7 +222,7 @@ class tool_behat {
// 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) {
......
......@@ -48,12 +48,6 @@ class behat_init_context extends BehatContext {
* @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));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment