-
-
Save kurtpayne/c69b92610a6d7be86a84 to your computer and use it in GitHub Desktop.
wp-cli warnings
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
$ php behat.phar features/theme.feature | |
Feature: Manage WordPress themes | |
Scenario: Installing and deleting theme # features/theme.feature:3 | |
Given a WP install # features/steps/given.php:40 | |
When I run `wp theme install p2` # features/steps/when.php:17 | |
$ wp theme install p2 | |
Installing P2 (1.5.3) | |
Downloading install package from https://wordpress.org/themes/download/p2.1.5.3.zip... | |
Unpacking the package... | |
Installing the theme... | |
Theme installed successfully. | |
PHP Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf713f7561.34580179/wp-includes/plugin.php on line 622 | |
Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf713f7561.34580179/wp-includes/plugin.php on line 622 | |
PHP Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf713f7561.34580179/wp-includes/plugin.php on line 622 | |
Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf713f7561.34580179/wp-includes/plugin.php on line 622 | |
cwd: /tmp/wp-cli-test-run-5387cf713f7561.34580179 | |
exit status: 0 | |
Then STDOUT should not be empty # features/steps/then.php:116 | |
When I run `wp theme status p2` # features/steps/when.php:17 | |
Then STDOUT should contain: # features/steps/then.php:15 | |
""" | |
Theme p2 details: | |
Name: P2 | |
""" | |
When I run `wp theme path p2` # features/steps/when.php:17 | |
Then STDOUT should contain: # features/steps/then.php:15 | |
""" | |
/themes/p2/style.css | |
""" | |
When I run `wp option get stylesheet` # features/steps/when.php:17 | |
Then save STDOUT as {PREVIOUS_THEME} # features/steps/given.php:91 | |
When I run `wp theme activate p2` # features/steps/when.php:17 | |
Then STDOUT should contain: # features/steps/then.php:15 | |
""" | |
Success: Switched to 'P2' theme. | |
""" | |
When I try `wp theme delete p2` # features/steps/when.php:17 | |
Then STDERR should be: # features/steps/then.php:15 | |
""" | |
Warning: Can't delete the currently active theme: p2 | |
""" | |
And STDOUT should be empty # features/steps/then.php:108 | |
When I run `wp theme activate {PREVIOUS_THEME}` # features/steps/when.php:17 | |
Then STDOUT should not be empty # features/steps/then.php:116 | |
When I run `wp theme delete p2` # features/steps/when.php:17 | |
Then STDOUT should not be empty # features/steps/then.php:116 | |
When I try the previous command again # features/steps/when.php:31 | |
Then STDERR should contain: # features/steps/then.php:15 | |
""" | |
The 'p2' theme could not be found. | |
""" | |
When I run `wp theme list` # features/steps/when.php:17 | |
Then STDOUT should not be empty # features/steps/then.php:116 | |
Scenario: Install a theme, activate, then force install an older version of the theme # features/theme.feature:53 | |
Given a WP install # features/steps/given.php:40 | |
When I run `wp theme install p2 --version=1.4.2` # features/steps/when.php:17 | |
$ wp theme install p2 --version=1.4.2 | |
Installing P2 (1.4.2) | |
Downloading install package from https://wordpress.org/themes/download/p2.1.4.2.zip... | |
Unpacking the package... | |
Installing the theme... | |
Theme installed successfully. | |
PHP Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf735facb1.25696624/wp-includes/plugin.php on line 622 | |
Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf735facb1.25696624/wp-includes/plugin.php on line 622 | |
PHP Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf735facb1.25696624/wp-includes/plugin.php on line 622 | |
Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf735facb1.25696624/wp-includes/plugin.php on line 622 | |
cwd: /tmp/wp-cli-test-run-5387cf735facb1.25696624 | |
exit status: 0 | |
Then STDOUT should not be empty # features/steps/then.php:116 | |
When I run `wp theme list` # features/steps/when.php:17 | |
Then STDOUT should be a table containing rows: # features/steps/then.php:35 | |
| name | status | update | version | | |
| p2 | inactive | available | 1.4.2 | | |
When I run `wp theme activate p2` # features/steps/when.php:17 | |
Then STDOUT should not be empty # features/steps/then.php:116 | |
When I run `wp theme install p2 --version=1.4.1 --force` # features/steps/when.php:17 | |
Then STDOUT should not be empty # features/steps/then.php:116 | |
When I run `wp theme list` # features/steps/when.php:17 | |
Then STDOUT should be a table containing rows: # features/steps/then.php:35 | |
| name | status | update | version | | |
| p2 | active | available | 1.4.1 | | |
Scenario: Get the path of an installed theme # features/theme.feature:75 | |
Given a WP install # features/steps/given.php:40 | |
When I run `wp theme install p2` # features/steps/when.php:17 | |
$ wp theme install p2 | |
Installing P2 (1.5.3) | |
Downloading install package from https://wordpress.org/themes/download/p2.1.5.3.zip... | |
Using cached file '/tmp/wp-cli-test-suite-cache-5387cf713862c9.41641373/theme/p2-1.5.3.zip'... | |
Unpacking the package... | |
Installing the theme... | |
Theme installed successfully. | |
PHP Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf7599d3d4.43612968/wp-includes/plugin.php on line 622 | |
Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf7599d3d4.43612968/wp-includes/plugin.php on line 622 | |
PHP Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf7599d3d4.43612968/wp-includes/plugin.php on line 622 | |
Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf7599d3d4.43612968/wp-includes/plugin.php on line 622 | |
cwd: /tmp/wp-cli-test-run-5387cf7599d3d4.43612968 | |
exit status: 0 | |
Then STDOUT should not be empty # features/steps/then.php:116 | |
When I run `wp theme path p2 --dir` # features/steps/when.php:17 | |
Then STDOUT should contain: # features/steps/then.php:15 | |
""" | |
wp-content/themes/p2 | |
""" | |
Scenario: Enabling and disabling a theme # features/theme.feature:87 | |
Given a WP multisite install # features/steps/given.php:52 | |
When I run `wp theme install p2` # features/steps/when.php:17 | |
$ wp theme install p2 | |
Installing P2 (1.5.3) | |
Downloading install package from https://wordpress.org/themes/download/p2.1.5.3.zip... | |
Using cached file '/tmp/wp-cli-test-suite-cache-5387cf713862c9.41641373/theme/p2-1.5.3.zip'... | |
Unpacking the package... | |
Installing the theme... | |
Theme installed successfully. | |
PHP Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf774407b4.52505605/wp-includes/plugin.php on line 622 | |
Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf774407b4.52505605/wp-includes/plugin.php on line 622 | |
PHP Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf774407b4.52505605/wp-includes/plugin.php on line 622 | |
Warning: Invalid argument supplied for foreach() in /tmp/wp-cli-test-run-5387cf774407b4.52505605/wp-includes/plugin.php on line 622 | |
cwd: /tmp/wp-cli-test-run-5387cf774407b4.52505605 | |
exit status: 0 | |
Then STDOUT should not be empty # features/steps/then.php:116 | |
When I try `wp option get allowedthemes` # features/steps/when.php:17 | |
Then the return code should be 1 # features/steps/then.php:7 | |
And STDERR should be empty # features/steps/then.php:108 | |
When I run `wp theme enable p2` # features/steps/when.php:17 | |
Then STDOUT should contain: # features/steps/then.php:15 | |
""" | |
Success: Enabled the 'P2' theme. | |
""" | |
When I run `wp option get allowedthemes` # features/steps/when.php:17 | |
Then STDOUT should contain: # features/steps/then.php:15 | |
""" | |
'p2' => true | |
""" | |
When I run `wp theme disable p2` # features/steps/when.php:17 | |
Then STDOUT should contain: # features/steps/then.php:15 | |
""" | |
Success: Disabled the 'P2' theme. | |
""" | |
When I run `wp option get allowedthemes` # features/steps/when.php:17 | |
Then STDOUT should not contain: # features/steps/then.php:15 | |
""" | |
'p2' => true | |
""" | |
When I run `wp theme enable p2 --activate` # features/steps/when.php:17 | |
Then STDOUT should contain: # features/steps/then.php:15 | |
""" | |
Success: Enabled the 'P2' theme. | |
Success: Switched to 'P2' theme. | |
""" | |
When I run `wp network-meta get 1 allowedthemes` # features/steps/when.php:17 | |
Then STDOUT should not contain: # features/steps/then.php:15 | |
""" | |
'p2' => true | |
""" | |
When I run `wp theme enable p2 --network` # features/steps/when.php:17 | |
Then STDOUT should contain: # features/steps/then.php:15 | |
""" | |
Success: Network enabled the 'P2' theme. | |
""" | |
When I run `wp network-meta get 1 allowedthemes` # features/steps/when.php:17 | |
Then STDOUT should contain: # features/steps/then.php:15 | |
""" | |
'p2' => true | |
""" | |
When I run `wp theme disable p2 --network` # features/steps/when.php:17 | |
Then STDOUT should contain: # features/steps/then.php:15 | |
""" | |
Success: Network disabled the 'P2' theme. | |
""" | |
When I run `wp network-meta get 1 allowedthemes` | |
Then STDOUT should not contain: | |
""" | |
'p2' => true | |
""" | |
Scenario: Enabling and disabling a theme without multisite | |
Given a WP install | |
When I try `wp theme enable p2` | |
Then STDERR should be: | |
""" | |
Error: This is not a multisite install. | |
""" | |
When I try `wp theme disable p2` | |
Then STDERR should be: | |
""" | |
Error: This is not a multisite install. | |
""" | |
5 scenarios (1 passed, 4 failed) | |
69 steps (9 passed, 56 skipped, 4 failed) | |
0m8.858s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment