File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -620,6 +620,22 @@ public function testGetAccessTokenByAPIKeyAndSecretWithInvalidClientID()
620
620
$ this ->assertEquals ($ result ->get_error_code (), $ this ->errorCode );
621
621
}
622
622
623
+ /**
624
+ * Test that fetching an Access Token using a blank client ID returns a WP_Error.
625
+ *
626
+ * @since 2.0.7
627
+ */
628
+ public function testGetAccessTokenByAPIKeyAndSecretWithBlankClientID ()
629
+ {
630
+ $ api = new ConvertKit_API_V4 ( '' , $ _ENV ['CONVERTKIT_OAUTH_REDIRECT_URI ' ] );
631
+ $ result = $ api ->get_access_token_by_api_key_and_secret (
632
+ $ _ENV ['CONVERTKIT_API_KEY ' ],
633
+ $ _ENV ['CONVERTKIT_API_SECRET ' ]
634
+ );
635
+ $ this ->assertInstanceOf (WP_Error::class, $ result );
636
+ $ this ->assertEquals ($ result ->get_error_code (), $ this ->errorCode );
637
+ }
638
+
623
639
/**
624
640
* Test that supplying valid API credentials to the API class returns the expected account information.
625
641
*
You can’t perform that action at this time.
0 commit comments