ReviewOS

also looking at this

meemalabs/meema-client-php

add test case

#37
Merged glennmichael123 wants to merge test-environment into main
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.

tests/ClientTest.phpmodified+4-4
Changes to tests/ClientTest.php
@@ -11,19 +11,19 @@ class ClientTest extends TestCase
1111
1212 public function initializeDotEnv(): void
1313 {
14 if (! file_exists(__DIR__.'/../.env')) {
14 if (! file_exists(dirname(__DIR__))) {
1515 return;
1616 }
1717
18 $dotenv = \Dotenv\Dotenv::createImmutable(dirname(__DIR__));
18 $dotenv = \Dotenv\Dotenv::createImmutable(dirname(dirname(__DIR__)));
1919 $dotenv->load();
2020 }
2121
2222 public function initializeClient()
2323 {
24 $teamId = $_ENV['PUBLISHABLE_KEY'];
24 $teamId = env('PUBLISHABLE_KEY');
2525
26 $client = new Client($teamId, $_ENV['BASE_URL_TEST']);
26 $client = new Client($teamId, env('BASE_URL_TEST'));
2727
2828 $this->client = $client;
2929