跳转到主要内容

When /^I (run|try) `([^`]+)` from '([^\s]+)'$/

在子目录中运行或尝试执行给定的命令。


用法

run 期望退出码为 0,而 try 允许非零退出码。

Scenario: 我的示例场景
  When I run `wp core is-installed`
  Then STDOUT should be empty

  When I run `wp core is-installed` from 'foo/wp-content'
  Then STDOUT should be empty

Behat 步骤文档在每次发布时从 WP-CLI 代码库生成。如需改进,请提交一个拉取请求。


相关