mirror of
https://fast.feibisi.com/https://github.com/wp-cli/scaffold-command.git
synced 2025-10-04 17:01:28 +08:00
Add test for checking existence of database
Add test for checking whether the database already exists, and how to handle it
This commit is contained in:
parent
39ffec66d0
commit
0f05f51f26
1 changed files with 11 additions and 0 deletions
|
@ -17,6 +17,10 @@ Feature: Scaffold install-wp-tests.sh tests
|
|||
@require-php-5.6
|
||||
Scenario: Install latest version of WordPress
|
||||
Given a WP install
|
||||
And a affirmative-response file:
|
||||
"""
|
||||
Y
|
||||
"""
|
||||
And I run `wp plugin path`
|
||||
And save STDOUT as {PLUGIN_DIR}
|
||||
And I run `wp scaffold plugin hello-world`
|
||||
|
@ -76,6 +80,13 @@ Feature: Scaffold install-wp-tests.sh tests
|
|||
When I run `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib phpunit -c {PLUGIN_DIR}/hello-world/phpunit.xml.dist`
|
||||
Then the return code should be 0
|
||||
|
||||
When I try `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib WP_CORE_DIR=/tmp/behat-wordpress /usr/bin/env bash {PLUGIN_DIR}/hello-world/bin/install-wp-tests.sh wp_cli_test_scaffold wp_cli_test password1 localhost latest < affirmative-response`
|
||||
Then the return code should be 0
|
||||
And STDOUT should contain:
|
||||
"""
|
||||
Recreated the database
|
||||
"""
|
||||
|
||||
@require-php-5.6
|
||||
Scenario: Install WordPress from trunk
|
||||
Given a WP install
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue