| group |
core |
| group |
theme_compat |
| package |
bbPress |
| inherited_from |
\BBP_UnitTestCase |
Methods
assertPreConditions()
assertPreConditions()
Inherited
clean_up_global_scope()
clean_up_global_scope()
Inherited
Commit a MySQL transaction.
commit_transaction()
InheritedStatic
Theme compatibility template selection cases.
get_theme_compat_template_cases() : array<mixed,array>
Returns
array<mixed,array>Test cases.
go_to()
go_to($url)
Inherited
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
We assume that the global can be wiped out
restore_admins()
Inherited
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
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
Utility method that resets permalinks and flushes rewrites.
set_permalink_structure(string $structure = '')
Inherited
| since |
2.6.0 bbPress (r5947) |
| global |
WP_Rewrite $wp_rewrite |
Parameters
$structure
stringOptional. Permalink structure to set. Default empty.
tearDown()
tearDown()
| inherited_from |
\BBP_UnitTestCase::tearDown() |
tearDown()
tearDown()
Inherited
Tear down globals set up in setUp_wp_mail()
tearDown_wp_mail($args)
InheritedStatic
test_theme_compat_template_selection()
test_theme_compat_template_selection(string $theme, boolean $supports_block_templates, boolean $is_block_theme, string $expected_template)
| ticket |
3487 |
| dataProvider |
get_theme_compat_template_cases |
Parameters
$theme
stringTheme stylesheet.
$supports_block_templates
booleanWhether the theme supports block templates.
$is_block_theme
booleanWhether the theme is a Block Theme.
$expected_template
stringExpected template path, relative to the test theme root.
Run the theme compatibility template selection.
get_theme_compat_template() : string
Returns
stringSelected template path.
Properties
$cached_SERVER_NAME
$cached_SERVER_NAME
Static
Original active theme stylesheet.
$original_theme : string
Original registered theme directories.
$original_theme_directories : array
Test theme root.
$theme_root : string