File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,9 +2,16 @@ Feature: Update core's database
22
33 Scenario : Update db on a single site
44 Given a WP install
5+ And a disable_sidebar_check.php file:
6+ """
7+ <?php
8+ WP_CLI::add_wp_hook( 'init', static function () {
9+ remove_action( 'after_switch_theme', '_wp_sidebars_changed' );
10+ } );
11+ """
512 And I try `wp theme install twentytwenty --activate`
613 And I run `wp core download --version=5.4 --force`
7- And I run `wp option update db_version 45805`
14+ And I run `wp option update db_version 45805 --require=disable_sidebar_check.php `
815
916 When I run `wp core update-db`
1017 Then STDOUT should contain:
@@ -20,9 +27,16 @@ Feature: Update core's database
2027
2128 Scenario : Dry run update db on a single site
2229 Given a WP install
30+ And a disable_sidebar_check.php file:
31+ """
32+ <?php
33+ WP_CLI::add_wp_hook( 'init', static function () {
34+ remove_action( 'after_switch_theme', '_wp_sidebars_changed' );
35+ } );
36+ """
2337 And I try `wp theme install twentytwenty --activate`
2438 And I run `wp core download --version=5.4 --force`
25- And I run `wp option update db_version 45805`
39+ And I run `wp option update db_version 45805 --require=disable_sidebar_check.php `
2640
2741 When I run `wp core update-db --dry-run`
2842 Then STDOUT should be:
You can’t perform that action at this time.
0 commit comments