OSDN Git Service

behat: make run_check() check STDERR
authorscribu <mail@scribu.net>
Fri, 21 Jun 2013 11:19:38 +0000 (14:19 +0300)
committerscribu <mail@scribu.net>
Fri, 12 Jul 2013 00:16:58 +0000 (03:16 +0300)
features/bootstrap/Process.php
features/flags.feature

index 792277d..992428a 100644 (file)
@@ -51,7 +51,7 @@ class Process {
        public function run_check( $subdir = '' ) {
                $r = $this->run( $subdir );
 
-               if ( $r->return_code ) {
+               if ( $r->return_code || !empty( $r->STDERR ) ) {
                        throw new \RuntimeException( sprintf( "%s: %s\ncwd: %s",
                                $r->command, $r->STDERR, $r->cwd ) );
                }
index 8cb7107..ee07a67 100644 (file)
@@ -28,7 +28,7 @@ Feature: Global flags
       CONST_WITHOUT_QUOTES
       """
 
-    When I run `wp eval 'echo CONST_WITHOUT_QUOTES;' --debug`
+    When I try `wp eval 'echo CONST_WITHOUT_QUOTES;' --debug`
     Then the return code should be 0
     And STDOUT should be:
       """