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 empty

Behat steps documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.



版本号 #1
由 cocobook-sync 创建于 2026-10-28 11:38:02 UTC
由 cocobook-sync 更新于 2026-10-28 11:38:02 UTC