Skip to content

Commit

Permalink
unit test null SignedRequest::getUserId
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-janu committed Apr 24, 2023
1 parent 2d91976 commit 49ec214
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/SignedRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,15 @@ public function testARawSignedRequestCanBeValidatedAndDecoded(): void
}


public function testAEmptyObjectPayload(): void
{
$rawSignedRequest = '4dMvNUHMgl8dlBF-XddkZzQHlhnEtiag0x9p-3-YS3U=.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTY4MjMzMzc5MH0=';
$sr = new SignedRequest($this->app, $rawSignedRequest);

$this->assertNull($sr->getUserId());
}


public function testInvalidBase64(): void
{
$this->expectException(SDKException::class);
Expand Down

0 comments on commit 49ec214

Please sign in to comment.