WordPress.org

Make WordPress Core

Changeset 30112


Ignore:
Timestamp:
10/30/2014 04:14:53 AM (5 years ago)
Author:
boonebgorges
Message:

Clean up cache invalidation suspension global in unit tests.

This fixes a test that was introduced in [30073] which was polluting later
tests.

See #21760.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/term/cache.php

    r30108 r30112  
    198198        $this->assertSame( $term_id, wp_cache_get( $cache_key_name, $taxonomy . ':names:' . wp_cache_get( 'last_changed', 'terms' ) ) );
    199199
    200         wp_suspend_cache_invalidation();
     200        $suspend = wp_suspend_cache_invalidation();
    201201        clean_term_cache( $term_id, $taxonomy );
    202202
     
    208208        // Verify that last changed has not been updated as part of an invalidation routine
    209209        $this->assertSame( $last_changed, wp_cache_get( 'last_changed', 'terms' ) );
     210
     211        // Clean up.
     212        wp_suspend_cache_invalidation( $suspend );
    210213    }
    211214}
Note: See TracChangeset for help on using the changeset viewer.