handbook/behat-steps/then-the-file-directory-should-strictly-exist-not-exist-be-contain-not-contain.md
github-actions[bot] c22aa665e6 Regenerate handbook
2025-12-17 18:56:32 +00:00

4.8 KiB

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 all, stop editing! Happy publishing.
    """

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