Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions features/core-check-update.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Feature: Check for more recent versions

# This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+
@require-mysql
Scenario: Check for update via Version Check API
Given a WP install
And I try `wp theme install twentytwenty --activate`
Expand Down
19 changes: 14 additions & 5 deletions features/core-install.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Feature: Install WordPress core

# TODO: Requires investigation for SQLite support.
# See https://github.com/wp-cli/core-command/issues/244
@require-mysql
Scenario: Two WordPress installs sharing the same user table won't update existing user
Given an empty directory
And WP files
Expand Down Expand Up @@ -36,7 +39,7 @@ Feature: Install WordPress core
When I run `wp --path=second user get testadmin --field=user_pass`
Then save STDOUT as {ORIGINAL_PASSWORD}

When I run `wp core config {CORE_CONFIG_SETTINGS} --extra-php < extra-config`
When I run `wp config create {CORE_CONFIG_SETTINGS} --skip-check --extra-php < extra-config`
Then STDOUT should be:
"""
Success: Generated 'wp-config.php' file.
Expand Down Expand Up @@ -81,6 +84,9 @@ Feature: Install WordPress core
wp_users
"""

# TODO: Requires investigation for SQLite support.
# See https://github.com/wp-cli/core-command/issues/244
@require-mysql
Scenario: Two WordPress installs sharing the same user table will create new user
Given an empty directory
And WP files
Expand All @@ -107,7 +113,7 @@ Feature: Install WordPress core
admin
"""

When I run `wp core config {CORE_CONFIG_SETTINGS} --extra-php < extra-config`
When I run `wp config create {CORE_CONFIG_SETTINGS} --skip-check --extra-php < extra-config`
Then STDOUT should be:
"""
Success: Generated 'wp-config.php' file.
Expand Down Expand Up @@ -187,7 +193,7 @@ Feature: Install WordPress core
And the wp-settings.php file should exist
And the {SUITE_CACHE_DIR}/core/wordpress-{VERSION}-de_DE.tar.gz file should exist

When I run `wp config create --dbname={DB_NAME} --dbuser={DB_USER} --dbpass={DB_PASSWORD} --dbhost={DB_HOST} --locale=de_DE`
When I run `wp config create --dbname={DB_NAME} --dbuser={DB_USER} --dbpass={DB_PASSWORD} --dbhost={DB_HOST} --locale=de_DE --skip-check`
Then STDOUT should be:
"""
Success: Generated 'wp-config.php' file.
Expand Down Expand Up @@ -216,6 +222,8 @@ Feature: Install WordPress core
Kategorien
"""

# This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+
@require-mysql
Scenario: Install WordPress with locale set to de_DE on WP >= 4.0
Given an empty directory
And an empty cache
Expand All @@ -231,7 +239,7 @@ Feature: Install WordPress core
And the wp-settings.php file should exist
And the {SUITE_CACHE_DIR}/core/wordpress-{VERSION}-de_DE.tar.gz file should exist

When I run `wp config create --dbname={DB_NAME} --dbuser={DB_USER} --dbpass={DB_PASSWORD} --dbhost={DB_HOST} --locale=de_DE`
When I run `wp config create --dbname={DB_NAME} --dbuser={DB_USER} --dbpass={DB_PASSWORD} --dbhost={DB_HOST} --locale=de_DE --skip-check`
Then STDOUT should be:
"""
Success: Generated 'wp-config.php' file.
Expand Down Expand Up @@ -286,6 +294,7 @@ Feature: Install WordPress core
Addition of multisite constants to 'wp-config.php' skipped. You need to add them manually:
"""

@require-mysql
Scenario: Install WordPress multisite with existing multisite constants in wp-config file
Given an empty directory
And WP files
Expand All @@ -302,7 +311,7 @@ Feature: Install WordPress core
define( 'BLOG_ID_CURRENT_SITE', 1 );
"""

When I run `wp core config {CORE_CONFIG_SETTINGS} --extra-php < extra-config`
When I run `wp config create {CORE_CONFIG_SETTINGS} --extra-php < extra-config`
Then STDOUT should be:
"""
Success: Generated 'wp-config.php' file.
Expand Down
8 changes: 8 additions & 0 deletions features/core-update-db.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Feature: Update core's database

# This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+
@require-mysql
Scenario: Update db on a single site
Given a WP install
And a disable_sidebar_check.php file:
Expand All @@ -25,6 +27,8 @@ Feature: Update core's database
Success: WordPress database already at latest db version 47018.
"""

# This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+
@require-mysql
Scenario: Dry run update db on a single site
Given a WP install
And a disable_sidebar_check.php file:
Expand All @@ -51,6 +55,8 @@ Feature: Update core's database
45805
"""

# This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+
@require-mysql
Scenario: Update db across network
Given a WP multisite install
And a disable_sidebar_check.php file:
Expand Down Expand Up @@ -91,6 +97,8 @@ Feature: Update core's database
{UPDATE_VERSION}
"""

# This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+
@require-mysql
Scenario: Update db across network, dry run
Given a WP multisite install
And a disable_sidebar_check.php file:
Expand Down
13 changes: 12 additions & 1 deletion features/core-update.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Feature: Update WordPress core

# This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+
@require-mysql
Scenario: Update from a ZIP file
Given a WP install
And I try `wp theme install twentytwenty --activate`
Expand Down Expand Up @@ -63,6 +65,8 @@ Feature: Update WordPress core
{WP_VERSION-4.1-latest}
"""

# This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+
@require-mysql
Scenario: Update to the latest minor release (PHP 7.1 compatible with WP >= 3.9)
Given a WP install
And I try `wp theme install twentytwenty --activate`
Expand Down Expand Up @@ -97,6 +101,8 @@ Feature: Update WordPress core
{WP_VERSION-4.1-latest}
"""

# This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+
@require-mysql
Scenario: Core update from cache
Given a WP install
And I try `wp theme install twentytwenty --activate`
Expand Down Expand Up @@ -146,6 +152,8 @@ Feature: Update WordPress core
Updating
"""

# This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+
@require-mysql
Scenario: Ensure cached partial upgrades aren't used in full upgrade
Given a WP install
And I try `wp theme install twentytwenty --activate`
Expand Down Expand Up @@ -215,7 +223,8 @@ Feature: Update WordPress core
wordpress-4.2.4-partial-1-en_US.zip
"""

@less-than-php-7.3
# This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+
@less-than-php-7.3 @require-mysql
Scenario: Make sure files are cleaned up
Given a WP install
And I try `wp theme install twentytwenty --activate`
Expand Down Expand Up @@ -250,6 +259,8 @@ Feature: Update WordPress core
When I run `wp post create --post_title='Test post' --porcelain`
Then STDOUT should be a number

# This test downgrades to an older WordPress version, but the SQLite plugin requires 6.0+
@require-mysql
Scenario: Make sure files are cleaned up with mixed case
Given a WP install
And I try `wp theme install twentytwenty --activate`
Expand Down
12 changes: 11 additions & 1 deletion features/core.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Feature: Manage WordPress installation

# `wp db create` does not yet work on SQLite,
# See https://github.com/wp-cli/db-command/issues/234
@require-mysql
Scenario: Database doesn't exist
Given an empty directory
And WP files
Expand Down Expand Up @@ -210,6 +213,9 @@ Feature: Manage WordPress installation
1
"""

# `wp db reset` does not yet work on SQLite,
# See https://github.com/wp-cli/db-command/issues/234
@require-mysql
Scenario: Install multisite from scratch, with MULTISITE already set in wp-config.php
Given a WP multisite install
And I run `wp db reset --yes`
Expand Down Expand Up @@ -244,6 +250,8 @@ Feature: Manage WordPress installation
"""
And the return code should be 1

# SQLite compat blocked by https://github.com/wp-cli/wp-cli-tests/pull/188.
@require-mysql
Scenario: Custom wp-content directory
Given a WP install
And a custom wp-content directory
Expand Down Expand Up @@ -301,7 +309,9 @@ Feature: Manage WordPress installation
"""
And the return code should be 1

@require-php-7.0
# `wp db create` does not yet work on SQLite,
# See https://github.com/wp-cli/db-command/issues/234
@require-php-7.0 @require-mysql
Scenario: Install WordPress in a subdirectory
Given an empty directory
And a wp-config.php file:
Expand Down