From 80bddb5a5f32453d8f518a7a136e7e2a8d1ab4a8 Mon Sep 17 00:00:00 2001
From: Erick Hitter <git-contrib@ethitter.com>
Date: Sat, 11 Jun 2022 21:41:14 -0700
Subject: [PATCH] Fix test

---
 tests/test-class-external-permalinks-redux-block-editor.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/test-class-external-permalinks-redux-block-editor.php b/tests/test-class-external-permalinks-redux-block-editor.php
index c64613d..acd2b3d 100644
--- a/tests/test-class-external-permalinks-redux-block-editor.php
+++ b/tests/test-class-external-permalinks-redux-block-editor.php
@@ -105,13 +105,16 @@ class TestClassExternalPermalinksReduxBlockEditor extends WP_UnitTestCase {
 	 * @covers ::enqueue()
 	 */
 	public function test_enqueue() {
-		$asset_handle = $asset_handle = 'external-permalinks-redux';
+		$asset_handle = 'external-permalinks-redux';
 
 		$this->assertFalse(
 			wp_script_is( $asset_handle, 'enqueued' ),
 			'Failed to assert that script is not enqueued.'
 		);
 
+		remove_all_actions( 'admin_init' );
+		do_action( 'admin_init' );
+		external_permalinks_redux::get_instance()->action_admin_init();
 		External_Permalinks_Redux_Block_Editor::get_instance()->enqueue();
 
 		$this->assertTrue(
-- 
GitLab