Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
b9b47418
Unverified
Commit
b9b47418
authored
Oct 05, 2016
by
Rajesh Taneja
Browse files
MDL-55986 behat: all options are not valid for single run
Sanitize options which are valid for single run only
parent
2a864ee9
Changes
1
Hide whitespace changes
Inline
Side-by-side
admin/tool/behat/cli/init.php
View file @
b9b47418
...
...
@@ -91,12 +91,20 @@ $commandoptions = "";
// If parallel run then use utilparallel.
if
(
$options
[
'parallel'
]
&&
$options
[
'parallel'
]
>
1
)
{
$utilfile
=
'util.php'
;
}
// Sanitize all input options, so they can be passed to util.
foreach
(
$options
as
$option
=>
$value
)
{
if
(
$value
)
{
$commandoptions
.
=
" --
$option
='
$value
'"
;
}
}
}
else
{
// Only sanitize options for single run.
$cmdoptionsforsinglerun
=
array
(
'run-with-theme'
);
// Sanitize input options, so they can be passed to util.
foreach
(
$options
as
$option
=>
$value
)
{
if
(
$value
)
{
$commandoptions
.
=
" --
$option
='
$value
'"
;
foreach
(
$cmdoptionsforsinglerun
as
$option
)
{
if
(
!
empty
(
$options
[
$option
])
)
{
$commandoptions
.
=
" --
$option
='
$options[$option]
'"
;
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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