-
·
Given /^save (STDOUT|STDERR) ([’].+[^’])?s?as {(w+)}$/
Store STDOUT or STDERR contents in a variable. Usage Scenario: My example scenario When I run `wp package path` Then save STDOUT as {PACKAGE_PATH} Scenario: My other scenario When I run `wp core download` Then save STDOUT ‘Downloading WordPress ([\d\.]+)’ as {VERSION} Behat steps documentation is generated from the WP-CLI codebase on every release. To…
-
·
Given /^save the (.+) file ([’].+[^’])?as {(w+)}$/
Stores the contents of the given file in a variable. Usage Scenario: My example scenario Given a WP installation with Composer And save the {RUN_DIR}/composer.json file as {COMPOSER_JSON} Behat steps documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request. Related Given an empty directory – Creates…
-
·
Given /^that HTTP requests to (.*?) will respond with:$/
Mock HTTP requests to a given URL. Usage Scenario: My example scenario Given that HTTP requests to https://api.github.com/repos/wp-cli/wp-cli/releases?per_page=100 will respond with: “”” HTTP/1.1 200 Content-Type: application/json { “foo”: “bar” } “”” Behat steps documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request. Related Given an empty…
-
·
Given /^a WP( d[^s]+)? install(?:ation)?$/
Installs WordPress. Usage Scenario: My example scenario Given a WP installation … Scenario: My other scenario Given a WP install … Scenario: My version-specific scenario Given a WP 6.4.2 installation … Behat steps documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request. Related Given an empty…
-
·
Given /^a WP multisite (subdirectory|subdomain)?s?(install|installation)$/
Installs WordPress Multisite. Usage Supports either subdirectory or subdomain installation. Scenario: My example scenario Given a WP multisite subdomain installation … Scenario: My other scenario Given a WP subdirectory install … Behat steps documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request. Related Given an empty…
-
·
Given an empty cache
Clears the WP-CLI cache directory. Usage Scenario: My example scenario Given an empty cache … Behat steps documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request. Related Given an empty directory – Creates an empty directory. Given /^an? (empty|non-existent) ([^\s]+) directory$/ – Creates or deletes a…
-
·
Given an empty directory
Creates an empty directory. Usage Scenario: My example scenario Given an empty directory … Behat steps documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request. Related Given /^an? (empty|non-existent) ([^\s]+) directory$/ – Creates or deletes a specific directory. Given an empty cache – Clears the WP-CLI…
-
·
Given /^an? (empty|non-existent) ([^s]+) directory$/
Creates or deletes a specific directory. Usage Scenario: My example scenario Given an empty foo-plugin directory And a non-existent bar-plugin directory … Behat steps documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request. Related Given an empty directory – Creates an empty directory. Given an empty…
-
·
Given these installed and active plugins:
Installs and activates one or more plugins. Usage Scenario: My example scenario Given a WP installation And these installed and active plugins: “”” akismet wordpress-importer “”” Behat steps documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request. Related Given an empty directory – Creates an empty…
-
·
Given /^an? ([^s]+) (file|cache file):$/
Creates a file with the given contents. Usage The file can be created either in the current working directory or in the cache directory. Scenario: My example scenario Given a wp-cli.yml file: “”” @foo: path: foo user: admin “”” Behat steps documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please…