Changeset 13461 for trunk/tests/phpunit/testcases/routing/core.php
- Timestamp:
- 04/24/2023 02:32:27 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/routing/core.php
r13314 r13461 6 6 class BP_Tests_Routing_Core extends BP_UnitTestCase { 7 7 protected $old_current_user = 0; 8 protected $permalink_structure = ''; 8 9 9 10 public function set_up() { … … 12 13 $this->old_current_user = get_current_user_id(); 13 14 $this->set_current_user( self::factory()->user->create( array( 'role' => 'subscriber' ) ) ); 15 $this->permalink_structure = get_option( 'permalink_structure', '' ); 14 16 } 15 17 … … 17 19 parent::tear_down(); 18 20 $this->set_current_user( $this->old_current_user ); 21 $this->set_permalink_structure( $this->permalink_structure ); 19 22 } 20 23 function test_wordpress_page() { 24 $this->set_permalink_structure( '/%postname%/' ); 21 25 $this->go_to( '/' ); 22 26 $this->assertEmpty( bp_current_component() ); … … 27 31 */ 28 32 function test_nav_menu() { 33 $this->set_permalink_structure( '/%postname%/' ); 29 34 $this->go_to( '/' ); 30 35 $this->assertTrue( isset( buddypress()->bp_nav['activity'] ) );
Note: See TracChangeset
for help on using the changeset viewer.