WordPress.org

Make WordPress Core

Changeset 40343


Ignore:
Timestamp:
03/28/17 01:45:43 (4 weeks ago)
Author:
jeremyfelt
Message:

Tests: Add missing global cache groups.

Add useremail, userslugs, networks, sites, and site-details as global cache groups when added with unit tests. This aligns the list with the core default.

Fixes #40283.

Location:
trunk/tests/phpunit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase.php

    r40241 r40343  
    302302        } 
    303303        wp_cache_flush(); 
    304         wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache' ) ); 
     304        wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites', 'site-details' ) ); 
    305305        wp_cache_add_non_persistent_groups( array( 'comment', 'counts', 'plugins' ) ); 
    306306    } 
  • trunk/tests/phpunit/tests/cache.php

    r38763 r40343  
    2323        $cache_class = get_class( $wp_object_cache ); 
    2424        $cache = new $cache_class(); 
    25         $cache->add_global_groups( array( 'global-cache-test', 'users', 'userlogins', 'usermeta', 'user_meta', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache' ) ); 
     25        $cache->add_global_groups( array( 'global-cache-test', 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites', 'site-details' ) ); 
    2626        return $cache; 
    2727    } 
Note: See TracChangeset for help on using the changeset viewer.