diff --git a/tests/SignedRequestTest.php b/tests/SignedRequestTest.php index 3e25448..85bf70e 100644 --- a/tests/SignedRequestTest.php +++ b/tests/SignedRequestTest.php @@ -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);