@@ -5391,8 +5391,7 @@ public function testRecommendationsScript()
5391
5391
*/
5392
5392
public function testRecommendationsScriptWhenCreatorNetworkDisabled ()
5393
5393
{
5394
- $ api = new ConvertKit_API ($ _ENV ['CONVERTKIT_API_KEY_NO_DATA ' ], $ _ENV ['CONVERTKIT_API_SECRET_NO_DATA ' ]);
5395
- $ result = $ api ->recommendations_script ();
5394
+ $ result = $ this ->api_no_data ->recommendations_script ();
5396
5395
$ this ->assertNotInstanceOf (WP_Error::class, $ result );
5397
5396
$ this ->assertIsArray ($ result );
5398
5397
$ this ->assertArrayHasKey ('enabled ' , $ result );
@@ -5409,7 +5408,7 @@ public function testRecommendationsScriptWhenCreatorNetworkDisabled()
5409
5408
*/
5410
5409
public function testGetLegacyFormHTML ()
5411
5410
{
5412
- $ result = $ this ->api ->get_form_html ($ _ENV ['CONVERTKIT_API_LEGACY_FORM_ID ' ]);
5411
+ $ result = $ this ->api ->get_form_html ($ _ENV ['CONVERTKIT_API_LEGACY_FORM_ID ' ], $ _ENV [ ' CONVERTKIT_API_KEY ' ] );
5413
5412
$ this ->assertNotInstanceOf (WP_Error::class, $ result );
5414
5413
$ this ->assertStringContainsString ('<form id="ck_subscribe_form" class="ck_subscribe_form" action="https://api.convertkit.com/landing_pages/ ' . $ _ENV ['CONVERTKIT_API_LEGACY_FORM_ID ' ] . '/subscribe" data-remote="true"> ' , $ result );
5415
5414
@@ -5428,7 +5427,7 @@ public function testGetLegacyFormHTML()
5428
5427
*/
5429
5428
public function testGetLegacyFormHTMLWithInvalidFormID ()
5430
5429
{
5431
- $ result = $ this ->api ->get_form_html ('11111 ' );
5430
+ $ result = $ this ->api ->get_form_html ('11111 ' , $ _ENV [ ' CONVERTKIT_API_KEY ' ] );
5432
5431
$ this ->assertInstanceOf (WP_Error::class, $ result );
5433
5432
}
5434
5433
0 commit comments