also looking at this
add test case
#37
8 files
+106
-88
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -11,19 +11,19 @@ class ClientTest extends TestCase | ||
| 11 | 11 | |
| 12 | 12 | public function initializeDotEnv(): void |
| 13 | 13 | { |
| 14 | if (! file_exists(__DIR__.'/../.env')) { | |
| 14 | if (! file_exists(dirname(__DIR__))) { | |
| 15 | 15 | return; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | $dotenv = \Dotenv\Dotenv::createImmutable(dirname(__DIR__)); | |
| 18 | $dotenv = \Dotenv\Dotenv::createImmutable(dirname(dirname(__DIR__))); | |
| 19 | 19 | $dotenv->load(); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | public function initializeClient() |
| 23 | 23 | { |
| 24 | $teamId = $_ENV['PUBLISHABLE_KEY']; | |
| 24 | $teamId = env('PUBLISHABLE_KEY'); | |
| 25 | 25 | |
| 26 | $client = new Client($teamId, $_ENV['BASE_URL_TEST']); | |
| 26 | $client = new Client($teamId, env('BASE_URL_TEST')); | |
| 27 | 27 | |
| 28 | 28 | $this->client = $client; |
| 29 | 29 | |