OSDN Git Service
(root)
/
wvm
/
wvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbd1a9f
)
behat: add aditional args if command merely starts with a given string
author
scribu
<mail@scribu.net>
Wed, 29 May 2013 23:04:50 +0000
(
02:04
+0300)
committer
scribu
<mail@scribu.net>
Wed, 29 May 2013 23:04:50 +0000
(
02:04
+0300)
features/bootstrap/FeatureContext.php
patch
|
blob
|
history
diff --git
a/features/bootstrap/FeatureContext.php
b/features/bootstrap/FeatureContext.php
index
20114dd
..
66b3bfb
100644
(file)
--- a/
features/bootstrap/FeatureContext.php
+++ b/
features/bootstrap/FeatureContext.php
@@
-153,9
+153,11
@@
class FeatureContext extends BehatContext implements ClosuredContextInterface {
}
public function proc( $command, $assoc_args = array() ) {
- if ( isset( self::$additional_args[ $command ] ) ) {
- $assoc_args = array_merge( self::$additional_args[ $command ],
- $assoc_args );
+ foreach ( self::$additional_args as $start => $additional_args ) {
+ if ( 0 === strpos( $command, $start ) ) {
+ $assoc_args = array_merge( $additional_args, $assoc_args );
+ break;
+ }
}
if ( !empty( $assoc_args ) )