From cb4a9ea174d67a9aa3eb0ae1fd610bce5bc91907 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Fri, 21 Aug 2015 20:32:42 +0000 Subject: [PATCH] Tests: Skip some tests for the Transients API when an external object cache is in use. `test_transient_data_with_timeout()`, `test_transient_add_timeout()`, `test_nonexistent_key_dont_delete_if_false()`, and `test_nonexistent_key_old_timeout` are testing option values which aren't available with an an external object cache like memcache. see #31491. git-svn-id: https://develop.svn.wordpress.org/trunk@33702 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/option/transient.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/phpunit/tests/option/transient.php b/tests/phpunit/tests/option/transient.php index c8f0b26dea..3dbd79d6d6 100644 --- a/tests/phpunit/tests/option/transient.php +++ b/tests/phpunit/tests/option/transient.php @@ -42,6 +42,10 @@ class Tests_Option_Transient extends WP_UnitTestCase { $this->markTestSkipped( 'Not testable in MS: wpmu_create_blog() defines WP_INSTALLING.' ); } + if ( wp_using_ext_object_cache() ) { + $this->markTestSkipped( 'Not testable with an external object cache.' ); + } + $key = rand_str(); $value = rand_str(); @@ -67,6 +71,10 @@ class Tests_Option_Transient extends WP_UnitTestCase { $this->markTestSkipped( 'Not testable in MS: wpmu_create_blog() defines WP_INSTALLING.' ); } + if ( wp_using_ext_object_cache() ) { + $this->markTestSkipped( 'Not testable with an external object cache.' ); + } + $key = rand_str(); $value = rand_str(); $value2 = rand_str(); @@ -90,6 +98,10 @@ class Tests_Option_Transient extends WP_UnitTestCase { * @ticket 30380 */ function test_nonexistent_key_dont_delete_if_false() { + if ( wp_using_ext_object_cache() ) { + $this->markTestSkipped( 'Not testable with an external object cache.' ); + } + // Create a bogus a transient $key = 'test_transient'; set_transient( $key, 'test', 60 * 10 ); @@ -122,6 +134,10 @@ class Tests_Option_Transient extends WP_UnitTestCase { $this->markTestSkipped( 'Not testable in MS: wpmu_create_blog() defines WP_INSTALLING.' ); } + if ( wp_using_ext_object_cache() ) { + $this->markTestSkipped( 'Not testable with an external object cache.' ); + } + // Create a transient $key = 'test_transient'; set_transient( $key, 'test', 60 * 10 );