Expect STDOUT or STDERR to be a version string comparing to the given version.
Usage
Scenario: My example scenario
Given a WP install
When I run `wp core version
Then STDOUT should be a version string >= 6.8
Behat steps documentation is generated from the WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ codebase on every release. To suggest improvements, please submit a pull request.
Related
- Then /^the return code should( not)? be (\d+)$/ – Expect a specific exit code of the previous command.
- Then /^(STDOUT|STDERR) should( strictly)? (be|contain|not contain):$/ – Check the contents of STDOUT or STDERR.
- Then /^(STDOUT|STDERR) should be a number$/ – Expect STDOUT or STDERR to be a numeric value.
- Then /^(STDOUT|STDERR) should not be a number$/ – Expect STDOUT or STDERR to not be a numeric value.
- Then /^STDOUT should be a table containing rows:$/ – Expect STDOUT to be a table containing the given rows.
- Then /^STDOUT should end with a table containing rows:$/ – Expect STDOUT to end with a table containing the given rows.
- Then /^STDOUT should be JSON containing:$/ – Expect valid JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. output in STDOUT.
- Then /^STDOUT should be a JSON array containing:$/ – Expect valid JSON array output in STDOUT.
- Then /^STDOUT should be CSV containing:$/ – Expect STDOUT to be CSV containing certain values.
- Then /^STDOUT should be YAML containing:$/ – Expect STDOUT to be YAML containig certain content.
- Then /^(STDOUT|STDERR) should be empty$/ – Expect STDOUT or STDERR to be empty.
- Then /^(STDOUT|STDERR) should not be empty$/ – Expect STDOUT or STDERR not to be empty.
- Then /^the (.+) (file|directory) should( strictly)? (exist|not exist|be:|contain:|not contain:)$/ – Expect a certain file or directory to (not) exist or (not) contain certain contents.
- Then /^the contents of the (.+) file should( not)? match (((\/.+\/)|(#.+#))([a-z]+)?)$/ – Match file contents against a regex.
- Then /^(STDOUT|STDERR) should( not)? match (((\/.+\/)|(#.+#))([a-z]+)?)$/ – Match STDOUT or STDERR against a regex.
- Then /^an email should (be sent|not be sent)$/ – Expect an email to be sent (or not).
- Then the HTTP status code should be :code – Expect the HTTP status code for visiting `http://localhost:8080`.