Skip to content

Commit 1241f5a

Browse files
committed
Fix: Skip tests for stats with serializable and non-serializable data when using external object cache
1 parent dea9671 commit 1241f5a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/phpunit/tests/cache.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,10 @@ public function test_wp_cache_delete_multiple() {
500500
* @covers WP_Object_Cache::stats
501501
*/
502502
public function test_stats_with_serializable_data() {
503+
if ( wp_using_ext_object_cache() ) {
504+
$this->markTestSkipped( 'This test requires that an external object cache is not in use.' );
505+
}
506+
503507
$this->cache->set( 'key1', 'value1', 'test-group' );
504508
$this->cache->set( 'key2', array( 'a', 'b', 'c' ), 'test-group' );
505509

@@ -521,6 +525,10 @@ public function test_stats_with_serializable_data() {
521525
* @covers WP_Object_Cache::stats
522526
*/
523527
public function test_stats_with_non_serializable_simplexml_data() {
528+
if ( wp_using_ext_object_cache() ) {
529+
$this->markTestSkipped( 'This test requires that an external object cache is not in use.' );
530+
}
531+
524532
if ( ! class_exists( 'SimpleXMLElement' ) ) {
525533
$this->markTestSkipped( 'SimpleXMLElement class is not available.' );
526534
}

0 commit comments

Comments
 (0)