[buddypress-trac] [BuddyPress Trac] #5402: Object cache - bp_core_get_user_domain() issue

buddypress-trac noreply at wordpress.org
Sat Feb 15 20:12:33 UTC 2014


#5402: Object cache - bp_core_get_user_domain() issue
------------------------------+------------------
 Reporter:  r-a-y             |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  2.0
Component:  Core              |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+------------------

Comment (by boonebgorges):

 You don't need to mock a persistent cache, since our unit tests all take
 place in the same pageload anyway. You can test that things are getting
 invalidated by doing a before-and-after test - a functional test:

 {{{
 public function test_bp_core_get_user_domain_after_directory_page_change()
 {
     $u = $this->create_user();

     $pages = bp_core_get_directory_pages();
     $members_page = get_post( $pages->members->ID );
     $members_page->post_name = 'new-members-slug';
     wp_update_post( $members_page );

     $user = new WP_User( $u );

     $this->assertSame( home_url( 'new-members-slug' ) . '/' .
 $user->user_nicename . '/', bp_core_get_user_domain( $u ) );
 }
 }}}

 I wrote that off the top of my head so it may not work as-is, but you get
 the idea? :)

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5402#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list