77
88trait WhenStepDefinitions {
99
10-
1110 public function wpcli_tests_invoke_proc ( $ proc , $ mode ) {
1211 $ map = array (
1312 'run ' => 'run_check_stderr ' ,
@@ -25,13 +24,23 @@ public function wpcli_tests_capture_email_sends( $stdout ) {
2524 }
2625
2726 /**
27+ * Launch a given command in the background.
28+ *
29+ * @access public
30+ *
2831 * @When /^I launch in the background `([^`]+)`$/
2932 */
3033 public function when_i_launch_in_the_background ( $ cmd ) {
3134 $ this ->background_proc ( $ cmd );
3235 }
3336
3437 /**
38+ * Run or try a given command.
39+ *
40+ * `run` expects an exit code 0, whereas `try` allows for non-zero exit codes.
41+ *
42+ * @access public
43+ *
3544 * @When /^I (run|try) `([^`]+)`$/
3645 */
3746 public function when_i_run ( $ mode , $ cmd ) {
@@ -41,6 +50,12 @@ public function when_i_run( $mode, $cmd ) {
4150 }
4251
4352 /**
53+ * Run or try a given command in a subdirectory.
54+ *
55+ * `run` expects an exit code 0, whereas `try` allows for non-zero exit codes.
56+ *
57+ * @access public
58+ *
4459 * @When /^I (run|try) `([^`]+)` from '([^\s]+)'$/
4560 */
4661 public function when_i_run_from_a_subfolder ( $ mode , $ cmd , $ subdir ) {
@@ -50,6 +65,12 @@ public function when_i_run_from_a_subfolder( $mode, $cmd, $subdir ) {
5065 }
5166
5267 /**
68+ * Run or try the previous command again.
69+ *
70+ * `run` expects an exit code 0, whereas `try` allows for non-zero exit codes.
71+ *
72+ * @access public
73+ *
5374 * @When /^I (run|try) the previous command again$/
5475 */
5576 public function when_i_run_the_previous_command_again ( $ mode ) {
0 commit comments