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.

.env.exampleadded+3-0
Changes to .env.example
@@ -0,0 +1,3 @@
1BASE_URL="http://meema-api.test/api/"
2BASE_URL_TEST="https://test-api.mee.ma/api/"
3PUBLISHABLE_KEY=
.github/workflows/run-tests.ymlmodified+1-1
Changes to .github/workflows/run-tests.yml
@@ -33,7 +33,7 @@ jobs:
3333
3434 - name: Install dependencies
3535 run: |
36 composer install
36 composer install && cp .env.example .env
3737 - name: Execute tests
3838 run: vendor/bin/pest
3939 env:
tests/ClientTest.phpmodified+2-2
Changes to tests/ClientTest.php
@@ -11,11 +11,11 @@ class ClientTest extends TestCase
1111
1212 public function initializeDotEnv(): void
1313 {
14 if (! file_exists(dirname(__DIR__))) {
14 if (! file_exists(__DIR__.'/../.env')) {
1515 return;
1616 }
1717
18 $dotenv = \Dotenv\Dotenv::createImmutable(dirname(dirname(__DIR__)));
18 $dotenv = \Dotenv\Dotenv::createImmutable(dirname(__DIR__));
1919 $dotenv->load();
2020 }
2121