1010
1111class FcmMessageTest extends TestCase
1212{
13- public function test_it_can_be_instantiated ()
13+ public function test_it_can_be_instantiated (): void
1414 {
1515 $ message = new FcmMessage (name: 'name ' );
1616
@@ -19,7 +19,7 @@ public function test_it_can_be_instantiated()
1919 $ this ->assertEquals ('name ' , $ message ->name );
2020 }
2121
22- public function test_it_can_be_created ()
22+ public function test_it_can_be_created (): void
2323 {
2424 $ message = FcmMessage::create (name: 'name ' );
2525
@@ -28,49 +28,49 @@ public function test_it_can_be_created()
2828 $ this ->assertEquals ('name ' , $ message ->name );
2929 }
3030
31- public function test_it_can_set_name ()
31+ public function test_it_can_set_name (): void
3232 {
3333 $ message = FcmMessage::create ()->name ('name ' );
3434
3535 $ this ->assertEquals (['name ' => 'name ' ], $ message ->toArray ());
3636 }
3737
38- public function test_it_can_set_token ()
38+ public function test_it_can_set_token (): void
3939 {
4040 $ message = FcmMessage::create ()->token ('token ' );
4141
4242 $ this ->assertEquals (['token ' => 'token ' ], $ message ->toArray ());
4343 }
4444
45- public function test_it_can_set_topic ()
45+ public function test_it_can_set_topic (): void
4646 {
4747 $ message = FcmMessage::create ()->topic ('topic ' );
4848
4949 $ this ->assertEquals (['topic ' => 'topic ' ], $ message ->toArray ());
5050 }
5151
52- public function test_it_can_set_condition ()
52+ public function test_it_can_set_condition (): void
5353 {
5454 $ message = FcmMessage::create ()->condition ('condition ' );
5555
5656 $ this ->assertEquals (['condition ' => 'condition ' ], $ message ->toArray ());
5757 }
5858
59- public function test_it_can_set_data ()
59+ public function test_it_can_set_data (): void
6060 {
6161 $ message = FcmMessage::create ()->data (['a ' => 'b ' ]);
6262
6363 $ this ->assertEquals (['data ' => ['a ' => 'b ' ]], $ message ->toArray ());
6464 }
6565
66- public function test_it_throws_exception_on_invalid_data ()
66+ public function test_it_throws_exception_on_invalid_data (): void
6767 {
6868 $ this ->expectException (\InvalidArgumentException::class);
6969
7070 FcmMessage::create ()->data (['a ' => 1 ]);
7171 }
7272
73- public function test_it_can_set_custom_attributes ()
73+ public function test_it_can_set_custom_attributes (): void
7474 {
7575 $ message = FcmMessage::create ()
7676 ->name ('name ' )
@@ -90,7 +90,7 @@ public function test_it_can_set_custom_attributes()
9090 $ this ->assertEquals ($ expected , $ message ->toArray ());
9191 }
9292
93- public function test_it_can_set_notification ()
93+ public function test_it_can_set_notification (): void
9494 {
9595 $ notification = Notification::create ()->title ('title ' );
9696
@@ -101,7 +101,7 @@ public function test_it_can_set_notification()
101101 ], $ message ->toArray ());
102102 }
103103
104- public function test_it_can_set_client ()
104+ public function test_it_can_set_client (): void
105105 {
106106 $ client = Mockery::mock (Messaging::class);
107107
@@ -110,7 +110,7 @@ public function test_it_can_set_client()
110110 $ this ->assertSame ($ client , $ message ->client );
111111 }
112112
113- public function test_appends_android_options_into_custom ()
113+ public function test_appends_android_options_into_custom (): void
114114 {
115115 $ message = FcmMessage::create ()
116116 ->notification (new Notification (title: 'title ' , body: 'body ' ))
@@ -123,7 +123,7 @@ public function test_appends_android_options_into_custom()
123123 $ this ->assertEquals ('channel_id ' , $ payload ['android ' ]['notification ' ]['channel_id ' ]);
124124 }
125125
126- public function test_appends_ios_options_into_custom ()
126+ public function test_appends_ios_options_into_custom (): void
127127 {
128128 $ message = FcmMessage::create ()
129129 ->ios (['payload ' => ['aps ' => ['sound ' => 'sound ' ]]]);
@@ -135,7 +135,7 @@ public function test_appends_ios_options_into_custom()
135135 $ this ->assertEquals ('sound ' , $ payload ['apns ' ]['payload ' ]['aps ' ]['sound ' ]);
136136 }
137137
138- public function test_preserves_existing_custom_keys_when_using_helpers ()
138+ public function test_preserves_existing_custom_keys_when_using_helpers (): void
139139 {
140140 $ message = FcmMessage::create ()
141141 ->custom (['meta ' => ['a ' => 1 ]])
0 commit comments