Changeset 6846
- Timestamp:
- 08/08/2018 06:24:20 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/testcases/core/cache.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/cache.php
r6585 r6846 8 8 9 9 /** 10 * @group counts 10 11 * @covers ::bbp_clean_post_cache 11 12 */ 12 13 public function test_bbp_clean_post_cache() { 13 14 14 // Get the topic post type.15 // Get the post types. 15 16 $tpt = bbp_get_topic_post_type(); 16 $rpt = bbp_get_ topic_post_type();17 $rpt = bbp_get_reply_post_type(); 17 18 18 19 // Set up a forum with 1 topic and 1 reply to that topic. … … 24 25 ), 25 26 ) ); 26 $r = $this->factory-> topic->create( array(27 $r = $this->factory->reply->create( array( 27 28 'post_parent' => $t, 28 29 'reply_meta' => array( … … 40 41 $t_key = md5( serialize( array( 'parent_id' => $t, 'post_type' => $rpt ) ) ); 41 42 $last_changed = wp_cache_get_last_changed( 'bbpress_posts' ); 42 43 43 44 // Keys 44 45 $f_key = "bbp_child_ids:{$f_key}:{$last_changed}"; … … 48 49 $this->assertEquals( array( $r ), wp_cache_get( $t_key, 'bbpress_posts' ) ); 49 50 50 // Clean the cache.51 // Clean the reply cache. 51 52 clean_post_cache( $r ); 52 53 53 54 // Setup 54 55 $last_changed = wp_cache_get_last_changed( 'bbpress_posts' ); 55 56 56 57 // Keys 57 58 $f_key = "bbp_child_ids:{$f_key}:{$last_changed}";
Note: See TracChangeset
for help on using the changeset viewer.