From 73bde8a278ddad79ccc582f36263ef9b779829ee Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 3 Jul 2014 01:16:33 +0000 Subject: [PATCH] Transient timeouts are untestable when `WP_INSTALLING` is defined and set to ANY value. Transient timeouts cannot be tested during multisite runs because `wpmu_create_blog()` sets `WP_INSTALLING`. I have zero idea how these tests ever passed. See #28706. git-svn-id: https://develop.svn.wordpress.org/trunk@28965 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/includes/install.php | 1 - tests/phpunit/tests/option/transient.php | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/includes/install.php b/tests/phpunit/includes/install.php index 82d53226a3..7081302d68 100644 --- a/tests/phpunit/includes/install.php +++ b/tests/phpunit/includes/install.php @@ -9,7 +9,6 @@ error_reporting( E_ALL & ~E_DEPRECATED & ~E_STRICT ); $config_file_path = $argv[1]; $multisite = ! empty( $argv[2] ); -define( 'WP_INSTALLING', true ); require_once $config_file_path; require_once dirname( __FILE__ ) . '/functions.php'; diff --git a/tests/phpunit/tests/option/transient.php b/tests/phpunit/tests/option/transient.php index 57a4a87682..63c4b01080 100644 --- a/tests/phpunit/tests/option/transient.php +++ b/tests/phpunit/tests/option/transient.php @@ -38,6 +38,10 @@ class Tests_Option_Transient extends WP_UnitTestCase { * @ticket 22807 */ function test_transient_data_with_timeout() { + if ( is_multisite() ) { + $this->markTestSkipped( 'Not testable in MS: wpmu_create_blog() defines WP_INSTALLING.' ); + } + $key = rand_str(); $value = rand_str(); @@ -59,6 +63,10 @@ class Tests_Option_Transient extends WP_UnitTestCase { * @ticket 22807 */ function test_transient_add_timeout() { + if ( is_multisite() ) { + $this->markTestSkipped( 'Not testable in MS: wpmu_create_blog() defines WP_INSTALLING.' ); + } + $key = rand_str(); $value = rand_str(); $value2 = rand_str();