From 310f6386674a183a59a10c72a79a6d7076d36006 Mon Sep 17 00:00:00 2001 From: Dimitrios Pantazis Date: Thu, 5 Dec 2024 20:33:53 +0200 Subject: [PATCH] Update connect tests --- tests/wpunit/Auth/Admin/ConnectControllerTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/wpunit/Auth/Admin/ConnectControllerTest.php b/tests/wpunit/Auth/Admin/ConnectControllerTest.php index 7712437c..f40db29d 100644 --- a/tests/wpunit/Auth/Admin/ConnectControllerTest.php +++ b/tests/wpunit/Auth/Admin/ConnectControllerTest.php @@ -83,6 +83,7 @@ public function test_it_stores_basic_token_data(): void { $this->assertSame( $token, $this->token_manager->get( $this->plugin ) ); $this->assertEquals( 1, did_action( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/' . $this->slug . '/connected' ) ); + $this->assertEquals( 1, did_action( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/connected' ) ); } public function test_it_sets_additional_license_key(): void { @@ -113,6 +114,7 @@ public function test_it_sets_additional_license_key(): void { $this->assertSame( $token, $this->token_manager->get( $this->plugin ) ); $this->assertSame( $this->plugin->get_license_key(), $license ); $this->assertEquals( 1, did_action( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/' . $this->slug . '/connected' ) ); + $this->assertEquals( 1, did_action( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/connected' ) ); } public function test_it_does_not_store_with_an_invalid_nonce(): void { @@ -134,6 +136,7 @@ public function test_it_does_not_store_with_an_invalid_nonce(): void { $this->assertNull( $this->token_manager->get( $this->plugin ) ); $this->assertEmpty( did_action( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/' . $this->slug . '/connected' ) ); + $this->assertEmpty( did_action( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/connected' ) ); } public function test_it_does_not_store_an_invalid_token(): void { @@ -159,6 +162,7 @@ public function test_it_does_not_store_an_invalid_token(): void { $this->assertNull( $this->token_manager->get( $this->plugin ) ); $this->assertEmpty( did_action( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/' . $this->slug . '/connected' ) ); + $this->assertEmpty( did_action( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/connected' ) ); } public function test_it_does_not_stores_token_or_license_with_a_slug_that_does_not_exist(): void { @@ -224,6 +228,7 @@ public function test_it_stores_token_but_not_license_without_a_license(): void { $this->assertSame( $token, $this->token_manager->get( $this->plugin ) ); $this->assertEmpty( $this->plugin->get_license_key() ); $this->assertEquals( 1, did_action( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/' . $this->slug . '/connected' ) ); + $this->assertEquals( 1, did_action( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/connected' ) ); } /** @@ -266,6 +271,7 @@ public function test_it_sets_token_and_additional_license_key_on_multisite_netwo $this->assertSame( $token, $this->token_manager->get( $this->plugin ) ); $this->assertSame( $this->plugin->get_license_key( 'network' ), $license ); $this->assertEquals( 1, did_action( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/' . $this->slug . '/connected' ) ); + $this->assertEquals( 1, did_action( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/connected' ) ); } /** @@ -310,6 +316,7 @@ public function test_it_stores_token_data_on_subfolder_subsite(): void { $this->assertSame( $token, $this->token_manager->get( $this->plugin ) ); $this->assertSame( $this->plugin->get_license_key( 'network' ), $license ); $this->assertEquals( 1, did_action( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/' . $this->slug . '/connected' ) ); + $this->assertEquals( 1, did_action( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/connected' ) ); } }