group common
group functions
group bbp_verify_nonce_request
package bbPress
inherited_from \BBP_UnitTestCase

 Methods

Add port 80 and /wordpress/ subdirectory to home URL.

add_port_and_subdirectory_to_home_url(string $url, string $path, string|null $scheme) : string

Parameters

$url

string

The complete home URL including scheme and path.

$path

string

Path relative to the home URL. Blank string if no path is specified.

$scheme

stringnull

Scheme to give the home URL context. Accepts 'http', 'https', 'relative' or null.

Returns

string

assertPreConditions()

assertPreConditions() 
Inherited

clean_up_global_scope()

clean_up_global_scope() 
Inherited

Commit a MySQL transaction.

commit_transaction() 
InheritedStatic

go_to()

go_to($url) 
Inherited

Parameters

$url

We can't use grant_super_admin() because we will need to modify the list more than once, and grant_super_admin() can only be run once because of its global check

grant_super_admin($user_id) 
Inherited

Parameters

$user_id

We assume that the global can be wiped out

restore_admins() 
Inherited
see

setUp()

setUp() 
inherited_from \BBP_UnitTestCase::setUp()

setUp()

setUp() 
Inherited

Fake WP mail globals, to avoid errors

setUpBeforeClass() 
InheritedStatic

Set up globals necessary to avoid errors when using wp_mail()

setUp_wp_mail($args) 
InheritedStatic

Parameters

$args

WP's core tests use wp_set_current_user() to change the current user during tests. BP caches the current user differently, so we have to do a bit more work to change it

set_current_user($user_id) 
InheritedStatic

Parameters

$user_id

tearDown()

tearDown() 
inherited_from \BBP_UnitTestCase::tearDown()

tearDown()

tearDown() 
Inherited

Tear down globals set up in setUp_wp_mail()

tearDown_wp_mail($args) 
InheritedStatic

Parameters

$args

test_bbp_verify_nonce_request_with_port_in_home_url_and_wordpress_installed_in_subdirectory()

test_bbp_verify_nonce_request_with_port_in_home_url_and_wordpress_installed_in_subdirectory() 

 Properties

 

$cached_SERVER_NAME

$cached_SERVER_NAME 

Default

null
Static
 

$http_host

$http_host 

Default

''
 

$request_uri

$request_uri 

Default

''
 

$server_port

$server_port 

Default

''