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
180 changes: 90 additions & 90 deletions features/install-wp-tests.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,31 @@ Feature: Scaffold install-wp-tests.sh tests
Scenario: Install latest version of WordPress
Given a WP install
And a affirmative-response file:
"""
Y
"""
"""
Y
"""
And a negative-response file:
"""
No
"""
"""
No
"""
And a get-phpunit-phar-url.php file:
"""
<?php
$version = 4;
if(PHP_VERSION_ID >= 50600) {
$version = 5;
}
if(PHP_VERSION_ID >= 70000) {
$version = 6;
}
if(PHP_VERSION_ID >= 70100) {
$version = 7;
}
if(PHP_VERSION_ID >= 80000) {
$version = 9;
}
echo "https://phar.phpunit.de/phpunit-{$version}.phar";
"""
"""
<?php
$version = 4;
if(PHP_VERSION_ID >= 50600) {
$version = 5;
}
if(PHP_VERSION_ID >= 70000) {
$version = 6;
}
if(PHP_VERSION_ID >= 70100) {
$version = 7;
}
if(PHP_VERSION_ID >= 80000) {
$version = 9;
}
echo "https://phar.phpunit.de/phpunit-{$version}.phar";
"""
And I run `wp eval-file get-phpunit-phar-url.php --skip-wordpress`
And save STDOUT as {PHPUNIT_PHAR_URL}
And I run `wget -q -O phpunit {PHPUNIT_PHAR_URL}`
Expand Down Expand Up @@ -97,7 +97,7 @@ Feature: Scaffold install-wp-tests.sh tests

# This throws a warning for the password provided via command line.
When I try `mysql -u{DB_USER} -p{DB_PASSWORD} -h{MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "SHOW DATABASES"`
And STDOUT should contain:
Then STDOUT should contain:
"""
wp_cli_test_scaffold
"""
Expand Down Expand Up @@ -137,31 +137,31 @@ Feature: Scaffold install-wp-tests.sh tests
Scenario: Install latest version of WordPress on PHP 8.0+ and WordPress less then 5.8
Given a WP install
And a affirmative-response file:
"""
Y
"""
"""
Y
"""
And a negative-response file:
"""
No
"""
"""
No
"""
And a get-phpunit-phar-url.php file:
"""
<?php
$version = 4;
if(PHP_VERSION_ID >= 50600) {
$version = 5;
}
if(PHP_VERSION_ID >= 70000) {
$version = 6;
}
if(PHP_VERSION_ID >= 70100) {
$version = 7;
}
if(PHP_VERSION_ID >= 80000) {
$version = 9;
}
echo "https://phar.phpunit.de/phpunit-{$version}.phar";
"""
"""
<?php
$version = 4;
if(PHP_VERSION_ID >= 50600) {
$version = 5;
}
if(PHP_VERSION_ID >= 70000) {
$version = 6;
}
if(PHP_VERSION_ID >= 70100) {
$version = 7;
}
if(PHP_VERSION_ID >= 80000) {
$version = 9;
}
echo "https://phar.phpunit.de/phpunit-{$version}.phar";
"""
And I run `wp eval-file get-phpunit-phar-url.php --skip-wordpress`
And save STDOUT as {PHPUNIT_PHAR_URL}
And I run `wget -q -O phpunit {PHPUNIT_PHAR_URL}`
Expand Down Expand Up @@ -216,7 +216,7 @@ Feature: Scaffold install-wp-tests.sh tests

# This throws a warning for the password provided via command line.
When I try `mysql -u{DB_USER} -p{DB_PASSWORD} -h{MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "SHOW DATABASES"`
And STDOUT should contain:
Then STDOUT should contain:
"""
wp_cli_test_scaffold
"""
Expand Down Expand Up @@ -268,31 +268,31 @@ Feature: Scaffold install-wp-tests.sh tests
Scenario: Install latest version of WordPress on PHP 8.0+ and WordPress above 5.8
Given a WP install
And a affirmative-response file:
"""
Y
"""
"""
Y
"""
And a negative-response file:
"""
No
"""
"""
No
"""
And a get-phpunit-phar-url.php file:
"""
<?php
$version = 4;
if(PHP_VERSION_ID >= 50600) {
$version = 5;
}
if(PHP_VERSION_ID >= 70000) {
$version = 6;
}
if(PHP_VERSION_ID >= 70100) {
$version = 7;
}
if(PHP_VERSION_ID >= 80000) {
$version = 9;
}
echo "https://phar.phpunit.de/phpunit-{$version}.phar";
"""
"""
<?php
$version = 4;
if(PHP_VERSION_ID >= 50600) {
$version = 5;
}
if(PHP_VERSION_ID >= 70000) {
$version = 6;
}
if(PHP_VERSION_ID >= 70100) {
$version = 7;
}
if(PHP_VERSION_ID >= 80000) {
$version = 9;
}
echo "https://phar.phpunit.de/phpunit-{$version}.phar";
"""
And I run `wp eval-file get-phpunit-phar-url.php --skip-wordpress`
And save STDOUT as {PHPUNIT_PHAR_URL}
And I run `wget -q -O phpunit {PHPUNIT_PHAR_URL}`
Expand Down Expand Up @@ -347,7 +347,7 @@ Feature: Scaffold install-wp-tests.sh tests

# This throws a warning for the password provided via command line.
When I try `mysql -u{DB_USER} -p{DB_PASSWORD} -h{MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "SHOW DATABASES"`
And STDOUT should contain:
Then STDOUT should contain:
"""
wp_cli_test_scaffold
"""
Expand Down Expand Up @@ -387,23 +387,23 @@ Feature: Scaffold install-wp-tests.sh tests
Scenario: Install WordPress from trunk
Given a WP install
And a get-phpunit-phar-url.php file:
"""
<?php
$version = 4;
if(PHP_VERSION_ID >= 50600) {
$version = 5;
}
if(PHP_VERSION_ID >= 70000) {
$version = 6;
}
if(PHP_VERSION_ID >= 70100) {
$version = 7;
}
if(PHP_VERSION_ID >= 80000) {
$version = 9;
}
echo "https://phar.phpunit.de/phpunit-{$version}.phar";
"""
"""
<?php
$version = 4;
if(PHP_VERSION_ID >= 50600) {
$version = 5;
}
if(PHP_VERSION_ID >= 70000) {
$version = 6;
}
if(PHP_VERSION_ID >= 70100) {
$version = 7;
}
if(PHP_VERSION_ID >= 80000) {
$version = 9;
}
echo "https://phar.phpunit.de/phpunit-{$version}.phar";
"""
And I run `wp eval-file get-phpunit-phar-url.php --skip-wordpress`
And save STDOUT as {PHPUNIT_PHAR_URL}
And I run `wget -q -O phpunit {PHPUNIT_PHAR_URL}`
Expand Down Expand Up @@ -471,7 +471,7 @@ Feature: Scaffold install-wp-tests.sh tests

# This throws a warning for the password provided via command line.
When I try `mysql -u{DB_USER} -p{DB_PASSWORD} -h{MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "SHOW DATABASES"`
And STDOUT should contain:
Then STDOUT should contain:
"""
wp_cli_test_scaffold
"""
Expand Down
5 changes: 2 additions & 3 deletions features/scaffold-block.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ Feature: WordPress block code scaffolding

Background:
Given a WP install
Given I run `wp scaffold plugin movies`
And I run `wp scaffold plugin movies`
And I run `wp plugin path movies --dir`
And save STDOUT as {PLUGIN_DIR}
Given I run `wp theme install twentytwelve --activate --force`
And I run `wp theme install twentytwelve --activate --force`
And I run `wp theme path twentytwelve --dir`
And save STDOUT as {THEME_DIR}


Scenario: Scaffold a block with an invalid slug
When I try `wp scaffold block The_Godfather`
Then STDERR should be:
Expand Down
Loading