Make WordPress Core

Ticket #31491: 31491-skip-all-transient-as-options-tests.patch

File 31491-skip-all-transient-as-options-tests.patch, 2.4 KB (added by ocean90, 10 years ago)
  • tests/phpunit/tests/option/siteTransient.php

     
    55 */
    66class Tests_Option_SiteTransient extends WP_UnitTestCase {
    77
     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        }
     15
    816        function test_the_basics() {
    917                $key = rand_str();
    1018                $value = rand_str();
  • tests/phpunit/tests/option/transient.php

     
    55 */
    66class Tests_Option_Transient extends WP_UnitTestCase {
    77
     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        }
     15
    816        function test_the_basics() {
    917                $key = rand_str();
    1018                $value = rand_str();
     
    4250                        $this->markTestSkipped( 'Not testable in MS: wpmu_create_blog() defines WP_INSTALLING.' );
    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();
    5155
     
    7175                        $this->markTestSkipped( 'Not testable in MS: wpmu_create_blog() defines WP_INSTALLING.' );
    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();
    8080                $value2 = rand_str();
     
    9898         * @ticket 30380
    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';
    107103                set_transient( $key, 'test', 60 * 10 );
     
    134130                        $this->markTestSkipped( 'Not testable in MS: wpmu_create_blog() defines WP_INSTALLING.' );
    135131                }
    136132
    137                 if ( wp_using_ext_object_cache() ) {
    138                         $this->markTestSkipped( 'Not testable with an external object cache.' );
    139                 }
    140 
    141133                // Create a transient
    142134                $key = 'test_transient';
    143135                set_transient( $key, 'test', 60 * 10 );