Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/WebAPI/Endpoints/WithAuthenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
2 changes: 1 addition & 1 deletion tests/WebAPI/Endpoints/WithAuthenticateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down