diff --git tests/phpunit/testcases/routing/members.php tests/phpunit/testcases/routing/members.php
index 4b52b61..03ee70e 100644
|
|
class BP_Tests_Routing_Members extends BP_UnitTestCase { |
108 | 108 | $this->go_to( bp_get_members_directory_permalink() . 'type/foo/' ); |
109 | 109 | $this->assertTrue( is_404() ); |
110 | 110 | } |
| 111 | |
| 112 | /** |
| 113 | * @ticket BP6325 |
| 114 | * @group me_redirection |
| 115 | */ |
| 116 | public function test_me_universal_redirect_url_logged_in() { |
| 117 | $old_current_user = get_current_user_id(); |
| 118 | $u1 = $this->factory->user->create(); |
| 119 | $this->set_current_user( $u1 ); |
| 120 | |
| 121 | $this->go_to( bp_get_members_directory_permalink() . 'me/' ); |
| 122 | $this->assertEquals( bp_displayed_user_id(), $u1 ); |
| 123 | |
| 124 | $this->set_current_user( $old_current_user ); |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * @ticket BP6325 |
| 129 | * @group me_redirection |
| 130 | */ |
| 131 | public function test_me_universal_redirect_url_logged_out_should_404() { |
| 132 | $old_current_user = get_current_user_id(); |
| 133 | $this->set_current_user( 0 ); |
| 134 | |
| 135 | $this->go_to( bp_get_members_directory_permalink() . 'me/' ); |
| 136 | $this->assertTrue( is_404() ); |
| 137 | |
| 138 | $this->set_current_user( $old_current_user ); |
| 139 | } |
111 | 140 | } |