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
This commit is contained in:
Dominik Schilling (ocean90) 2015-08-21 20:32:42 +00:00
parent 326b67c0aa
commit cb4a9ea174
1 changed files with 16 additions and 0 deletions

View File

@ -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 );