Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/phpunit/tests/entity-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ class Tests_Entity_Actions extends WP_UnitTestCase {
* the default actions of the tests, hooked at priority 0 as WordPress
* registers its own, so every test runs against a registry holding
* actions registered before the callbacks hooked at the default priority
* run.
* run. It also resets the registry, as an earlier test may have read it
* with the actions WordPress registers.
*/
public function set_up() {
parent::set_up();
remove_action( 'wp_entity_actions_api_init', 'register_core_entity_actions', 0 );
add_action( 'wp_entity_actions_api_init', array( __CLASS__, 'register_default_actions' ), 0 );
self::reset_registry();
}

/**
Expand Down
Loading