mirror of
https://github.com/buddypress/buddypress.git
synced 2026-07-23 21:06:56 +08:00
These back compatibility mechanism, which was in BP since version 2.6, has moved to the BP Classic plugin. Fixes #8927 Closes https://github.com/buddypress/buddypress/pull/121 git-svn-id: https://buddypress.svn.wordpress.org/trunk@13507 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
29 lines
783 B
PHP
29 lines
783 B
PHP
<?php
|
|
/**
|
|
* @group core
|
|
* @group routing
|
|
*/
|
|
class BP_Tests_Routing_Core extends BP_UnitTestCase {
|
|
protected $old_current_user = 0;
|
|
protected $permalink_structure = '';
|
|
|
|
public function set_up() {
|
|
parent::set_up();
|
|
|
|
$this->old_current_user = get_current_user_id();
|
|
$this->set_current_user( self::factory()->user->create( array( 'role' => 'subscriber' ) ) );
|
|
$this->permalink_structure = get_option( 'permalink_structure', '' );
|
|
}
|
|
|
|
public function tear_down() {
|
|
parent::tear_down();
|
|
$this->set_current_user( $this->old_current_user );
|
|
$this->set_permalink_structure( $this->permalink_structure );
|
|
}
|
|
|
|
function test_wordpress_page() {
|
|
$this->set_permalink_structure( '/%postname%/' );
|
|
$this->go_to( '/' );
|
|
$this->assertEmpty( bp_current_component() );
|
|
}
|
|
}
|