Skip to content

Commit 5b1093b

Browse files
committed
Add test to ensure app_instance_id is validated in post
1 parent 281b169 commit 5b1093b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/Unit/FirebaseTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ public function test_converts_to_full_microtime_stamp()
9999
$this->assertTrue($arr['timestamp_micros'] > 1_000_000);
100100
}
101101

102+
public function test_throws_if_app_instance_id_missing()
103+
{
104+
$this->expectException(Facade\Type\Ga4ExceptionType::class);
105+
$this->expectExceptionCode(Facade\Type\Ga4ExceptionType::REQUEST_MISSING_FIREBASE_APP_INSTANCE_ID);
106+
107+
Firebase::new($this->prefill['firebase_app_id'], $this->prefill['api_secret'], /* DEBUG */ true)->post();
108+
}
109+
102110
public function test_throws_if_microtime_older_than_three_days()
103111
{
104112
$this->expectException(Facade\Type\Ga4ExceptionType::class);

0 commit comments

Comments
 (0)