Skip to content

Commit

Permalink
test(unit) dispatch correct event
Browse files Browse the repository at this point in the history
  • Loading branch information
lucatume committed Feb 17, 2024
1 parent 8d24c7e commit 3546559
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unit/lucatume/WPBrowser/Events/Module/WPLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ public function should_throw_if_load_only_and_word_press_not_installed(): void
$this->assertInIsolation(static function () use ($wpRootDir, $wpLoader) {
$wpLoader->_initialize();

Dispatcher::dispatch(Events::SUITE_BEFORE);
Dispatcher::dispatch(Events::SUITE_INIT);
});
}

Expand Down Expand Up @@ -704,7 +704,7 @@ public function should_load_word_press_before_suite_if_load_only_w_config_files(
$actions[] = WPLoader::EVENT_AFTER_LOADONLY;
});

Dispatcher::dispatch(Events::SUITE_BEFORE);
Dispatcher::dispatch(Events::SUITE_INIT);

Assert::assertEquals('test_file_002.php', getenv('LOADED_2'));
Assert::assertEquals($wpRootDir . '/', ABSPATH);
Expand Down Expand Up @@ -794,7 +794,7 @@ public function should_not_throw_when_load_only_true_and_using_db_module(
$this->assertInIsolation(static function () use ($wpLoader, $wpRootDir) {
$wpLoader->_initialize();

Dispatcher::dispatch(Events::SUITE_BEFORE);
Dispatcher::dispatch(Events::SUITE_INIT);

Assert::assertEquals($wpRootDir . '/', ABSPATH);
});
Expand Down Expand Up @@ -1779,7 +1779,7 @@ public function should_initialize_correctly_with_sqlite_database_in_load_only_mo

$this->assertInIsolation(static function () use ($wpLoader) {
$wpLoader->_initialize();
Dispatcher::dispatch(Events::SUITE_BEFORE);
Dispatcher::dispatch(Events::SUITE_INIT);

Assert::assertTrue(function_exists('do_action'));
Assert::assertInstanceOf(\WP_User::class, wp_get_current_user());
Expand Down

0 comments on commit 3546559

Please sign in to comment.