-
·
Then /^(STDOUT|STDERR) should not be a number$/
Expect STDOUT or STDERR to not be a numeric value. Usage Scenario: My example scenario Given a WP installation When I run `wp post list –format=json` Then STDOUT should not be a number 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…
-
·
Then /^(STDOUT|STDERR) should not be empty$/
Expect STDOUT or STDERR not to be empty. Usage Scenario: My example scenario When I run `wp user create examplejane [email protected]` Then STDOUT should not be empty 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…
-
·
Then /^(STDOUT|STDERR) should( not)? match (((/.+/)|(#.+#))([a-z]+)?)$/
Match STDOUT or STDERR against a regex. Usage Scenario: My example scenario When I run `wp dist-archive wp-content/plugins/hello-world` Then STDOUT should match /^Success: Created hello-world.0.1.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/ 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.…
-
·
Then /^STDOUT should be a JSON array 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. array output in STDOUT. Usage Errors when some items are missing from the expected array. Scenario: My example scenario When I…
-
·
Then /^(STDOUT|STDERR) should( strictly)? (be|contain|not contain):$/
Check the contents of STDOUT or STDERR. Usage Scenario: My example scenario Given an empty directory When I run `wp core is-installed` Then STDOUT should be empty Scenario: My other scenario Given a WP install When I run `wp plugin install akismet` Then STDOUT should contain: “”” Plugin installed successfully. “”” And STDERR should be…
-
·
Then /^STDOUT should be a table containing rows:$/
Expect STDOUT to be a table containing the given rows. Usage Scenario: My example scenario Given a WP installation When I run `wp config list –fields=name,type` Then STDOUT should be a table containing rows: | name | type | | DB_NAME | constant | | DB_USER | constant | Behat steps documentation is generated from…
-
·
Then /^the contents of the (.+) file should( not)? match (((/.+/)|(#.+#))([a-z]+)?)$/
Match file contents against a regex. Usage Scenario: My example scenario When I run `wp scaffold plugin hello-world` Then the contents of the wp-content/plugins/hello-world/languages/hello-world.pot file should match /X-Generator:\s/ 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.…
-
·
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. Usage Scenario: My example scenario When I run `wp core download` Then the wp-settings.php file should exist And the wp-content directory should exist And the {RUN_DIR} directory should contain: “”” index.php license.txt “”” And the wp-config.php file should contain: “”” That’s…
-
·
Then /^STDOUT should be CSV containing:$/
Expect STDOUT to be CSV containing certain values. Usage Scenario: My example scenario When I run `wp term list post_tag –fields=name,slug –format=csv` Then STDOUT should be CSV containing: | name | slug | | Test term | test | Behat steps documentation is generated from the WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress,…
-
·
Given /^that HTTP requests to (.*?) will respond with:$/
Mock HTTPHTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. requests to a given URLURL A specific web address…