diff --git a/src/WebAPI/Endpoints/WithAuthenticate.php b/src/WebAPI/Endpoints/WithAuthenticate.php index 677ac6b..973e709 100644 --- a/src/WebAPI/Endpoints/WithAuthenticate.php +++ b/src/WebAPI/Endpoints/WithAuthenticate.php @@ -9,10 +9,10 @@ public function token(): string { $token = getenv('SLACK_API_ACCESS_TOKEN'); - if (!$token) { + if ($token === false) { throw new \RuntimeException('Require Slack Api Access Token to set env: SLACK_API_ACCESS_TOKEN'); } return $token; } -} \ No newline at end of file +} diff --git a/tests/WebAPI/Endpoints/WithAuthenticateTest.php b/tests/WebAPI/Endpoints/WithAuthenticateTest.php index f774302..69601dd 100644 --- a/tests/WebAPI/Endpoints/WithAuthenticateTest.php +++ b/tests/WebAPI/Endpoints/WithAuthenticateTest.php @@ -22,7 +22,7 @@ public function testToken() */ public function testTokenException() { - putenv('SLACK_API_ACCESS_TOKEN='); + putenv('SLACK_API_ACCESS_TOKEN'); /** @var WithAuthenticate $withAuthenticate */ $withAuthenticate = $this->getMockForTrait(WithAuthenticate::class); $this->expectException(\RuntimeException::class);