@@ -4,16 +4,16 @@ Feature: Managed the WordPress object cache
44 Scenario : Default group is 'default'
55 Given a WP install
66 And a wp-content/mu-plugins/test-harness.php file:
7- """
7+ """php
88 <?php
9- $set_foo = function() {
10- wp_cache_set( 'foo', 'bar' );
9+ $set_foo = function () {
10+ wp_cache_set( 'foo', 'bar' );
1111 };
12- $set_foo_value = function() {
13- wp_cache_set( 'foo', 2 );
12+ $set_foo_value = function () {
13+ wp_cache_set( 'foo', 2 );
1414 };
15- $log_foo_value = function() {
16- WP_CLI::log( var_export( wp_cache_get( 'foo' ), true ) );
15+ $log_foo_value = function () {
16+ WP_CLI::log( var_export( wp_cache_get( 'foo' ), true ) );
1717 };
1818 WP_CLI::add_hook( 'before_invoke:cache get', $set_foo );
1919 WP_CLI::add_hook( 'before_invoke:cache delete', $set_foo );
@@ -150,12 +150,12 @@ Feature: Managed the WordPress object cache
150150 """php
151151 <?php
152152 class Dummy_Object_Cache extends WP_Object_Cache {
153- public function flush_group( $group ) {
154- if ( $group === 'permanent_root_cache' ) {
155- return false;
153+ public function flush_group( $group ) {
154+ if ( $group === 'permanent_root_cache' ) {
155+ return false;
156+ }
157+ return parent::flush_group( $group );
156158 }
157- return parent::flush_group( $group );
158- }
159159 }
160160 $GLOBALS['wp_object_cache'] = new Dummy_Object_Cache();
161161 """
@@ -172,12 +172,12 @@ Feature: Managed the WordPress object cache
172172 """php
173173 <?php
174174 class Dummy_Object_Cache extends WP_Object_Cache {
175- public function flush_group( $group ) {
176- if ( $group === 'permanent_root_cache' ) {
177- return false;
175+ public function flush_group( $group ) {
176+ if ( $group === 'permanent_root_cache' ) {
177+ return false;
178+ }
179+ return parent::flush_group( $group );
178180 }
179- return parent::flush_group( $group );
180- }
181181 }
182182 $GLOBALS['wp_object_cache'] = new Dummy_Object_Cache();
183183 """
0 commit comments