-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from wp-cli/v2-prep
Adapt test suite to fit v2 architecture
- Loading branch information
Showing
6 changed files
with
162 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,144 +1,150 @@ | ||
# behat.yml | ||
# WP-CLI framework | ||
# WP-CLI bundle | ||
default: | ||
paths: | ||
features: 'vendor/wp-cli/wp-cli-bundle/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# WP-CLI framework | ||
wp-cli/wp-cli: | ||
paths: | ||
features: 'vendor/wp-cli/wp-cli/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp cache | ||
wp-cli/cache-command: | ||
paths: | ||
features: 'vendor/wp-cli/cache-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp checksum | ||
wp-cli/checksum-command: | ||
paths: | ||
features: 'vendor/wp-cli/checksum-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp config | ||
wp-cli/config-command: | ||
paths: | ||
features: 'vendor/wp-cli/config-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp core | ||
wp-cli/core-command: | ||
paths: | ||
features: 'vendor/wp-cli/core-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp cron | ||
wp-cli/cron-command: | ||
paths: | ||
features: 'vendor/wp-cli/cron-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp db | ||
wp-cli/db-command: | ||
paths: | ||
features: 'vendor/wp-cli/db-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp embed | ||
wp-cli/embed-command: | ||
paths: | ||
features: 'vendor/wp-cli/embed-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp comment | wp menu | wp network | wp option | wp post | wp site | wp taxonomy | wp term | wp user | ||
wp-cli/entity-command: | ||
paths: | ||
features: 'vendor/wp-cli/entity-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp eval | ||
wp-cli/eval-command: | ||
paths: | ||
features: 'vendor/wp-cli/eval-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp export | ||
wp-cli/export-command: | ||
paths: | ||
features: 'vendor/wp-cli/export-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp plugin | wp theme | ||
wp-cli/extension-command: | ||
paths: | ||
features: 'vendor/wp-cli/extension-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp import | ||
wp-cli/import-command: | ||
paths: | ||
features: 'vendor/wp-cli/import-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp language | ||
wp-cli/language-command: | ||
paths: | ||
features: 'vendor/wp-cli/language-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp media | ||
wp-cli/media-command: | ||
paths: | ||
features: 'vendor/wp-cli/media-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp package | ||
wp-cli/package-command: | ||
paths: | ||
features: 'vendor/wp-cli/package-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp rewrite | ||
wp-cli/rewrite-command: | ||
paths: | ||
features: 'vendor/wp-cli/rewrite-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp role | ||
wp-cli/role-command: | ||
paths: | ||
features: 'vendor/wp-cli/role-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp scaffold | ||
wp-cli/scaffold-command: | ||
paths: | ||
features: 'vendor/wp-cli/scaffold-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp search-replace | ||
wp-cli/search-replace-command: | ||
paths: | ||
features: 'vendor/wp-cli/search-replace-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp server | ||
wp-cli/server-command: | ||
paths: | ||
features: 'vendor/wp-cli/server-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp shell | ||
wp-cli/shell-command: | ||
paths: | ||
features: 'vendor/wp-cli/shell-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp super-admin | ||
wp-cli/super-admin-command: | ||
paths: | ||
features: 'vendor/wp-cli/super-admin-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' | ||
|
||
# wp widget | ||
wp-cli/widget-command: | ||
paths: | ||
features: 'vendor/wp-cli/widget-command/features' | ||
bootstrap: 'vendor/wp-cli/wp-cli/features/bootstrap' | ||
bootstrap: 'vendor/wp-cli/wp-cli-tests/features/bootstrap' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
|
||
# The tests to be run are selected based on the $TEST_PACKAGE and $TEST_PHAR | ||
# environment variables. | ||
# | ||
# $TEST_PACKAGE enables tests against source packages. You can select which | ||
# commands/packages to test. | ||
# | ||
# The following options can be set: | ||
# | ||
# - "none": No packages are tested. | ||
# - "all": The framework as well as all bundled commands are tested. | ||
# - "commands": Only the command packages are tested. | ||
# - <package name>: Only the package named <package name> is tested. | ||
# | ||
# $TEST_PHAR enables tests against the Phar distributions. You can select which | ||
# distribution to test. The selected distribution will be tested against all | ||
# bundled commands/packages. | ||
# | ||
# The following options can be set: | ||
# | ||
# - "none": Skip phar testing. | ||
# - "nightly": Use the nightly phar. | ||
# - "stable": Use the latest stable phar release. | ||
# - "all": Use both the latest stable release phar as well as the nightly phar. | ||
|
||
set -e | ||
|
||
export BUILD_DIR="${TRAVIS_BUILD_DIR:-$(pwd)}" | ||
|
||
if [ -z "$WP_VERSION" ]; then | ||
export WP_VERSION="latest" | ||
fi | ||
|
||
if [ -z "$TEST_PACKAGE" ]; then | ||
export TEST_PACKAGE="all" | ||
fi | ||
|
||
if [ "$WP_VERSION" = "latest" ]; then | ||
echo "WP_VERSION set to 'latest', detecting actual version number..." | ||
export WP_VERSION="$(curl -s https://api.wordpress.org/core/version-check/1.7/ | jq -r ".offers[0].current")" | ||
echo "WP_VERSION => $WP_VERSION" | ||
fi | ||
|
||
if [ "${TEST_PHAR+x}" ]; then | ||
echo "Running Phar distribution tests..." | ||
"${BUILD_DIR}/bin/test-phar" | ||
exit | ||
fi | ||
|
||
if [ "${TEST_PACKAGE+x}" ]; then | ||
echo "Running source package tests..." | ||
"${BUILD_DIR}/bin/test-source" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.