Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d45e65c
)
MDL-42170 tool_behat: simple OR patterns now shown as select boxes
author
Sam Hemelryk
<sam@moodle.com>
Sun, 6 Oct 2013 21:17:04 +0000
(10:17 +1300)
committer
Sam Hemelryk
<sam@moodle.com>
Sun, 6 Oct 2013 21:17:04 +0000
(10:17 +1300)
admin/tool/behat/renderer.php
patch
|
blob
|
blame
|
history
diff --git
a/admin/tool/behat/renderer.php
b/admin/tool/behat/renderer.php
index
0f5ac5e
..
324241b
100644
(file)
--- a/
admin/tool/behat/renderer.php
+++ b/
admin/tool/behat/renderer.php
@@
-105,6
+105,15
@@
class tool_behat_renderer extends plugin_renderer_base {
$stepsdefinitions
);
+ // Replace simple OR options.
+ $regex = '#\(\?P<[^>]+>([^\)|]+\|[^\)]+)\)#';
+ $stepsdefinitions = preg_replace_callback($regex,
+ function($matches){
+ return html_writer::select(explode('|', $matches[1]), uniqid());
+ },
+ $stepsdefinitions
+ );
+
}
// Steps definitions.