Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit 90d78a5

Browse files
committed
Add no regression test for the InvalidArgumentException
1 parent cf1a523 commit 90d78a5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/MessageTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
use LaravelFCM\Message\Exceptions\InvalidOptionsException;
34
use LaravelFCM\Message\OptionsBuilder;
45
use LaravelFCM\Message\OptionsPriorities;
56
use LaravelFCM\Message\PayloadDataBuilder;
@@ -127,4 +128,16 @@ public function it_construct_a_valid_json_with_notification()
127128
$json = json_encode($notificationBuilder->build()->toArray());
128129
$this->assertJsonStringEqualsJsonString($targetFull, $json);
129130
}
131+
132+
/**
133+
* @test
134+
*/
135+
public function it_throws_an_invalidoptionsexception_if_the_interval_is_too_big()
136+
{
137+
$this->setExpectedException(InvalidOptionsException::class);
138+
139+
$optionBuilder = new OptionsBuilder();
140+
$optionBuilder->setTimeToLive(2419200 * 10);
141+
142+
}
130143
}

0 commit comments

Comments
 (0)