Skip to content

Commit 9c7f79a

Browse files
committed
Fix getenv
1 parent 12afc81 commit 9c7f79a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/Feature/Endpoints/AuthenticationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ public function it_can_retrieve_an_access_token()
1818
(new Parser)->parse($accessToken->token)->validate(new ValidationData())
1919
);
2020
$this->assertFalse($accessToken->isExpired());
21-
$this->assertEquals($_ENV['DHLPARCEL_ACCOUNT_ID'], $accessToken->getAccountId());
21+
$this->assertEquals(getenv('DHLPARCEL_ACCOUNT_ID'), $accessToken->getAccountId());
2222
}
2323
}

tests/TestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ abstract class TestCase extends BaseTestCase
1313
protected function setUp(): void
1414
{
1515
try {
16-
(Dotenv::createImmutable(__DIR__.'/..'))->load();
16+
(Dotenv::createUnsafeImmutable(__DIR__.'/..'))->load();
1717
} catch (InvalidPathException $e) {
1818
//
1919
} catch (InvalidFileException $e) {
2020
dd('The environment file is invalid');
2121
}
2222

2323
$this->client = (new Client)->setUserId(
24-
$_ENV['DHLPARCEL_ID']
24+
getenv('DHLPARCEL_ID')
2525
)->setApiKey(
26-
$_ENV['DHLPARCEL_SECRET']
26+
getenv('DHLPARCEL_SECRET')
2727
);
2828

2929
parent::setUp();

0 commit comments

Comments
 (0)