Make WordPress Core

Changeset 34767


Ignore:
Timestamp:
10/02/2015 05:09:03 AM (11 years ago)
Author:
wonderboymusic
Message:

Unit Tests: when wp_using_ext_object_cache(), mark some transient tests as skipped.

Props ocean90.
See #31491.

Location:
trunk/tests/phpunit/tests/option
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/option/siteTransient.php

    r25002 r34767  
    55 */
    66class Tests_Option_SiteTransient extends WP_UnitTestCase {
     7
     8        public function setUp() {
     9                parent::setUp();
     10
     11                if ( wp_using_ext_object_cache() ) {
     12                        $this->markTestSkipped( 'Not testable with an external object cache.' );
     13                }
     14        }
    715
    816        function test_the_basics() {
  • trunk/tests/phpunit/tests/option/transient.php

    r33702 r34767  
    55 */
    66class Tests_Option_Transient extends WP_UnitTestCase {
     7
     8        public function setUp() {
     9                parent::setUp();
     10
     11                if ( wp_using_ext_object_cache() ) {
     12                        $this->markTestSkipped( 'Not testable with an external object cache.' );
     13                }
     14        }
    715
    816        function test_the_basics() {
     
    4351                }
    4452
    45                 if ( wp_using_ext_object_cache() ) {
    46                         $this->markTestSkipped( 'Not testable with an external object cache.' );
    47                 }
    48 
    4953                $key = rand_str();
    5054                $value = rand_str();
     
    7276                }
    7377
    74                 if ( wp_using_ext_object_cache() ) {
    75                         $this->markTestSkipped( 'Not testable with an external object cache.' );
    76                 }
    77 
    7878                $key = rand_str();
    7979                $value = rand_str();
     
    9999         */
    100100        function test_nonexistent_key_dont_delete_if_false() {
    101                 if ( wp_using_ext_object_cache() ) {
    102                         $this->markTestSkipped( 'Not testable with an external object cache.' );
    103                 }
    104 
    105101                // Create a bogus a transient
    106102                $key = 'test_transient';
     
    133129                if ( is_multisite() ) {
    134130                        $this->markTestSkipped( 'Not testable in MS: wpmu_create_blog() defines WP_INSTALLING.' );
    135                 }
    136 
    137                 if ( wp_using_ext_object_cache() ) {
    138                         $this->markTestSkipped( 'Not testable with an external object cache.' );
    139131                }
    140132
Note: See TracChangeset for help on using the changeset viewer.