Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
MDL-37046 behat: Removing MinkContext
  • Loading branch information
David Monllao committed Jan 29, 2013
1 parent de424b4 commit 6d9427b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 deletions.
5 changes: 1 addition & 4 deletions admin/tool/behat/index.php
Expand Up @@ -36,10 +36,7 @@
$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();
Expand Down
1 change: 0 additions & 1 deletion admin/tool/behat/lang/en/tool_behat.php
Expand Up @@ -29,7 +29,6 @@
$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';
Expand Down
10 changes: 1 addition & 9 deletions admin/tool/behat/locallib.php
Expand Up @@ -190,12 +190,6 @@ private static function update_config_file($component = '') {

$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:
Expand All @@ -204,8 +198,6 @@ private static function update_config_file($component = '') {
bootstrap: ' . $behatpath . '/features/bootstrap
context:
class: behat_init_context
parameters:
loadbuiltincontexts: ' . $loadbuiltincontexts . '
extensions:
Behat\MinkExtension\Extension:
base_url: ' . $CFG->test_wwwroot . '
Expand All @@ -230,7 +222,7 @@ class: behat_init_context

// 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) {
Expand Down
6 changes: 0 additions & 6 deletions lib/behat/features/bootstrap/behat_init_context.php
Expand Up @@ -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));
}

Expand Down

0 comments on commit 6d9427b

Please sign in to comment.