Skip to content

Commit cbf268b

Browse files
committed
Fix tests
1 parent 6eb6d1e commit cbf268b

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
CONVERTKIT_OAUTH_REFRESH_TOKEN=${{ secrets.CONVERTKIT_OAUTH_REFRESH_TOKEN }}
5252
CONVERTKIT_OAUTH_ACCESS_TOKEN_NO_DATA=${{ secrets.CONVERTKIT_OAUTH_ACCESS_TOKEN_NO_DATA }}
5353
CONVERTKIT_OAUTH_REFRESH_TOKEN_NO_DATA=${{ secrets.CONVERTKIT_OAUTH_REFRESH_TOKEN_NO_DATA }}
54+
CONVERTKIT_API_KEY=${{ secrets.CONVERTKIT_API_KEY }}
5455
CONVERTKIT_OAUTH_CLIENT_ID=${{ secrets.CONVERTKIT_OAUTH_CLIENT_ID }}
5556
CONVERTKIT_OAUTH_CLIENT_SECRET=${{ secrets.CONVERTKIT_OAUTH_CLIENT_SECRET }}
5657
CONVERTKIT_OAUTH_REDIRECT_URI=${{ secrets.CONVERTKIT_OAUTH_REDIRECT_URI }}

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
"ConvertKit_API\\": "src/"
3131
}
3232
},
33+
"autoload-dev": {
34+
"psr-4": {
35+
"": "tests/"
36+
}
37+
},
3338
"minimum-stability": "dev",
3439
"prefer-stable": true,
3540
"scripts": {

tests/ConvertKitAPIKeyTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
use Dotenv\Dotenv;
55
use ConvertKit_API\ConvertKit_API;
66

7-
require_once __DIR__ . '/ConvertKitAPITest.php';
8-
97
/**
108
* ConvertKit API Key class tests.
119
*/
@@ -305,7 +303,7 @@ public function testAddSubscribersToForms()
305303
$this->subscriber_ids[] = $subscriber->subscriber->id;
306304

307305
$this->expectException(ClientException::class);
308-
306+
309307
// Add subscribers to forms.
310308
$result = $this->api->add_subscribers_to_forms(
311309
forms_subscribers_ids: [
@@ -407,7 +405,6 @@ public function testAddSubscribersToFormsWithReferrerUTMParams()
407405
],
408406
]
409407
);
410-
411408
}
412409

413410
/**
@@ -759,5 +756,4 @@ public function testCreatePurchaseWithNoProducts()
759756
products: [],
760757
);
761758
}
762-
763759
}

tests/ConvertKitAPIOAuthTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3+
use GuzzleHttp\Exception\ClientException;
4+
use GuzzleHttp\Exception\ServerException;
35
use Dotenv\Dotenv;
46
use ConvertKit_API\ConvertKit_API;
57

6-
require_once __DIR__ . '/ConvertKitAPITest.php';
7-
88
/**
99
* ConvertKit API OAuth Key class tests.
1010
*/

0 commit comments

Comments
 (0)