diff --git a/features/option.feature b/features/option.feature index 61b041630..bd6c05591 100644 --- a/features/option.feature +++ b/features/option.feature @@ -286,6 +286,45 @@ Feature: Manage WordPress options on """ + Scenario: Report an error when the autoload value cannot be stored + Given a WP install + And a wp-content/mu-plugins/fail-autoload-update.php file: + """ + update( + $updated = $wpdb->update( $wpdb->options, array( 'autoload' => $autoload ), array( 'option_name' => $option ) ); + if ( false === $updated ) { + WP_CLI::error( "Could not update autoload value for '{$option}' option." ); + } + // Recreate cache refreshing from update_option(). $notoptions = wp_cache_get( 'notoptions', 'options' );