- Timestamp:
- 11/03/2024 06:19:06 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/test-components-controller.php
r14026 r14070 21 21 */ 22 22 public function test_get_items() { 23 $this->bp::set_current_user( $this->user );23 wp_set_current_user( $this->user ); 24 24 25 25 $request = new WP_REST_Request( 'GET', $this->endpoint_url ); … … 42 42 */ 43 43 public function test_get_items_paginated() { 44 $this->bp::set_current_user( $this->user );44 wp_set_current_user( $this->user ); 45 45 46 46 $request = new WP_REST_Request( 'GET', $this->endpoint_url ); … … 67 67 */ 68 68 public function test_get_items_invalid_status() { 69 $this->bp::set_current_user( $this->user );69 wp_set_current_user( $this->user ); 70 70 71 71 $request = new WP_REST_Request( 'GET', $this->endpoint_url ); … … 98 98 $u = static::factory()->user->create(); 99 99 100 $this->bp::set_current_user( $u );100 wp_set_current_user( $u ); 101 101 102 102 $request = new WP_REST_Request( 'GET', $this->endpoint_url ); … … 117 117 ); 118 118 119 $this->bp::set_current_user( $u );119 wp_set_current_user( $u ); 120 120 121 121 $request = new WP_REST_Request( 'GET', $this->endpoint_url ); … … 136 136 */ 137 137 public function test_get_items_active_component_features() { 138 $this->bp::set_current_user( $this->user );138 wp_set_current_user( $this->user ); 139 139 140 140 $request = new WP_REST_Request( 'GET', $this->endpoint_url ); … … 157 157 */ 158 158 public function test_get_items_inactive_component_features() { 159 $this->bp::set_current_user( $this->user );159 wp_set_current_user( $this->user ); 160 160 161 161 add_filter( 'bp_is_messages_star_active', '__return_false' ); … … 190 190 */ 191 191 public function test_get_items_inactive_component() { 192 $this->bp::set_current_user( $this->user );192 wp_set_current_user( $this->user ); 193 193 194 194 add_filter( 'bp_is_active', array( $this, 'deactivate_activity_component' ), 10, 2 ); … … 237 237 */ 238 238 public function test_update_item() { 239 $this->bp::set_current_user( $this->user );239 wp_set_current_user( $this->user ); 240 240 241 241 $request = new WP_REST_Request( 'PUT', $this->endpoint_url ); … … 260 260 */ 261 261 public function test_update_item_nonexistent_component() { 262 $this->bp::set_current_user( $this->user );262 wp_set_current_user( $this->user ); 263 263 264 264 $request = new WP_REST_Request( 'PUT', $this->endpoint_url ); … … 278 278 */ 279 279 public function test_update_item_empty_action() { 280 $this->bp::set_current_user( $this->user );280 wp_set_current_user( $this->user ); 281 281 282 282 $request = new WP_REST_Request( 'PUT', $this->endpoint_url ); … … 296 296 */ 297 297 public function test_update_item_invalid_action() { 298 $this->bp::set_current_user( $this->user );298 wp_set_current_user( $this->user ); 299 299 300 300 $request = new WP_REST_Request( 'PUT', $this->endpoint_url ); … … 332 332 $u = static::factory()->user->create(); 333 333 334 $this->bp::set_current_user( $u );334 wp_set_current_user( $u ); 335 335 336 336 $request = new WP_REST_Request( 'PUT', $this->endpoint_url );
Note: See TracChangeset
for help on using the changeset viewer.