Unit Tests: when wp_using_ext_object_cache()
, mark some transient tests as skipped.
Props ocean90. See #31491. git-svn-id: https://develop.svn.wordpress.org/trunk@34767 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c6571bcfad
commit
79dc7efc73
@ -5,6 +5,14 @@
|
||||
*/
|
||||
class Tests_Option_SiteTransient extends WP_UnitTestCase {
|
||||
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
if ( wp_using_ext_object_cache() ) {
|
||||
$this->markTestSkipped( 'Not testable with an external object cache.' );
|
||||
}
|
||||
}
|
||||
|
||||
function test_the_basics() {
|
||||
$key = rand_str();
|
||||
$value = rand_str();
|
||||
|
@ -5,6 +5,14 @@
|
||||
*/
|
||||
class Tests_Option_Transient extends WP_UnitTestCase {
|
||||
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
if ( wp_using_ext_object_cache() ) {
|
||||
$this->markTestSkipped( 'Not testable with an external object cache.' );
|
||||
}
|
||||
}
|
||||
|
||||
function test_the_basics() {
|
||||
$key = rand_str();
|
||||
$value = rand_str();
|
||||
@ -42,10 +50,6 @@ 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();
|
||||
|
||||
@ -71,10 +75,6 @@ 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();
|
||||
@ -98,10 +98,6 @@ 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 );
|
||||
@ -134,10 +130,6 @@ 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 );
|
||||
|
Loading…
Reference in New Issue
Block a user