Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
6d9427bb
Commit
6d9427bb
authored
Dec 13, 2012
by
David Monllaó
Browse files
MDL-37046 behat: Removing MinkContext
parent
de424b46
Changes
4
Hide whitespace changes
Inline
Side-by-side
admin/tool/behat/index.php
View file @
6d9427bb
...
...
@@ -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
();
...
...
admin/tool/behat/lang/en/tool_behat.php
View file @
6d9427bb
...
...
@@ -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'
;
...
...
admin/tool/behat/locallib.php
View file @
6d9427bb
...
...
@@ -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
)
{
...
...
lib/behat/features/bootstrap/behat_init_context.php
View file @
6d9427bb
...
...
@@ -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
));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment