See https://github.com/wp-cli/wp-cli/pull/398/files#r3869578
}
);
-$steps->Then( '/^it should run with errors$/' ,
- function ( $world ) {
- if ( empty( $world->result->STDERR ) )
- throw new \Exception( "No error produced" );
- }
-);
-
$steps->Then( '/^(STDOUT|STDERR) should (be|contain|not contain):$/',
function ( $world, $stream, $action, PyStringNode $expected ) {
$output = $world->result->$stream;
"""
When I run the previous command again
- Then it should run with errors
- And STDERR should be:
- """
- Error: A term with the name provided already exists.
- """
+ Then STDERR should not be empty
When I run `wp term list post_tag --format=json`
Then it should run without errors