[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @group core 4 * @group routing 5 */ 6 class BP_Tests_Routing_Core extends BP_UnitTestCase { 7 protected $old_current_user = 0; 8 9 public function setUp() { 10 parent::setUp(); 11 12 $this->old_current_user = get_current_user_id(); 13 $this->set_current_user( self::factory()->user->create( array( 'role' => 'subscriber' ) ) ); 14 } 15 16 public function tearDown() { 17 parent::tearDown(); 18 $this->set_current_user( $this->old_current_user ); 19 } 20 function test_wordpress_page() { 21 $this->go_to( '/' ); 22 $this->assertEmpty( bp_current_component() ); 23 } 24 25 /** 26 * @expectedIncorrectUsage bp_nav 27 */ 28 function test_nav_menu() { 29 $this->go_to( '/' ); 30 $this->assertTrue( isset( buddypress()->bp_nav['activity'] ) ); 31 $this->assertTrue( isset( buddypress()->bp_nav['profile'] ) ); 32 } 33 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Dec 22 01:00:54 2024 | Cross-referenced by PHPXref 0.7.1 |