99use Kreait \Firebase \Exception \InvalidArgumentException ;
1010use Kreait \Firebase \Factory ;
1111use Kreait \Laravel \Firebase \FirebaseProjectManager ;
12+ use PHPUnit \Framework \Attributes \Test ;
1213use Psr \Cache \CacheItemPoolInterface ;
1314use ReflectionObject ;
1415
@@ -22,9 +23,7 @@ protected function defineEnvironment($app): void
2223 $ app ['config ' ]->set ('firebase.projects.app.credentials ' , __DIR__ .'/_fixtures/service_account.json ' );
2324 }
2425
25- /**
26- * @test
27- */
26+ #[Test]
2827 public function a_project_configuration_has_to_exist (): void
2928 {
3029 $ manager = $ this ->app ->make (FirebaseProjectManager::class);
@@ -36,9 +35,7 @@ public function a_project_configuration_has_to_exist(): void
3635 $ this ->getAccessibleMethod ($ manager , 'configuration ' )->invoke ($ manager , $ projectName );
3736 }
3837
39- /**
40- * @test
41- */
38+ #[Test]
4239 public function a_default_project_can_be_set (): void
4340 {
4441 $ manager = $ this ->app ->make (FirebaseProjectManager::class);
@@ -51,9 +48,7 @@ public function a_default_project_can_be_set(): void
5148 $ this ->assertSame ($ projectName , $ this ->app ->config ->get ('firebase.default ' ), 'default project should be set in config ' );
5249 }
5350
54- /**
55- * @test
56- */
51+ #[Test]
5752 public function calls_are_passed_to_default_project (): void
5853 {
5954 $ manager = $ this ->app ->make (FirebaseProjectManager::class);
@@ -63,9 +58,7 @@ public function calls_are_passed_to_default_project(): void
6358 $ this ->assertSame ($ manager ->project ($ projectName )->auth (), $ manager ->auth ());
6459 }
6560
66- /**
67- * @test
68- */
61+ #[Test]
6962 public function credentials_can_be_configured_using_a_json_file (): void
7063 {
7164 // Reference credentials
@@ -84,9 +77,7 @@ public function credentials_can_be_configured_using_a_json_file(): void
8477 $ this ->assertSame ($ credentials , $ serviceAccount );
8578 }
8679
87- /**
88- * @test
89- */
80+ #[Test]
9081 public function json_file_credentials_can_be_used_using_the_deprecated_configuration_entry (): void
9182 {
9283 // Reference credentials
@@ -105,9 +96,7 @@ public function json_file_credentials_can_be_used_using_the_deprecated_configura
10596 $ this ->assertSame ($ credentials , $ serviceAccount );
10697 }
10798
108- /**
109- * @test
110- */
99+ #[Test]
111100 public function credentials_can_be_configured_using_an_array (): void
112101 {
113102 // Set configuration and retrieve project
@@ -133,9 +122,7 @@ public function credentials_can_be_configured_using_an_array(): void
133122 $ this ->assertSame ($ credentials , $ serviceAccount );
134123 }
135124
136- /**
137- * @test
138- */
125+ #[Test]
139126 public function projects_can_have_different_credentials (): void
140127 {
141128 // Reference credentials
@@ -165,9 +152,7 @@ public function projects_can_have_different_credentials(): void
165152 $ this ->assertSame ($ secondCredentials , $ secondServiceAccount );
166153 }
167154
168- /**
169- * @test
170- */
155+ #[Test]
171156 public function the_realtime_database_url_can_be_configured (): void
172157 {
173158 $ projectName = $ this ->app ->config ->get ('firebase.default ' );
@@ -181,9 +166,7 @@ public function the_realtime_database_url_can_be_configured(): void
181166 $ this ->assertSame ($ url , (string ) $ property ->getValue ($ database ));
182167 }
183168
184- /**
185- * @test
186- */
169+ #[Test]
187170 public function the_dynamic_links_default_domain_can_be_configured (): void
188171 {
189172 $ projectName = $ this ->app ->config ->get ('firebase.default ' );
@@ -198,9 +181,7 @@ public function the_dynamic_links_default_domain_can_be_configured(): void
198181 $ this ->assertSame ($ domain , $ configuredDomain );
199182 }
200183
201- /**
202- * @test
203- */
184+ #[Test]
204185 public function the_storage_default_bucket_can_be_configured (): void
205186 {
206187 $ projectName = $ this ->app ->config ->get ('firebase.default ' );
@@ -213,9 +194,7 @@ public function the_storage_default_bucket_can_be_configured(): void
213194 $ this ->assertSame ($ name , $ property ->getValue ($ storage ));
214195 }
215196
216- /**
217- * @test
218- */
197+ #[Test]
219198 public function logging_can_be_configured (): void
220199 {
221200 $ projectName = $ this ->app ->config ->get ('firebase.default ' );
@@ -228,9 +207,7 @@ public function logging_can_be_configured(): void
228207 $ this ->assertNotNull ($ property ->getValue ($ factory ));
229208 }
230209
231- /**
232- * @test
233- */
210+ #[Test]
234211 public function debug_logging_can_be_configured (): void
235212 {
236213 $ projectName = $ this ->app ->config ->get ('firebase.default ' );
@@ -243,9 +220,7 @@ public function debug_logging_can_be_configured(): void
243220 $ this ->assertNotNull ($ property ->getValue ($ factory ));
244221 }
245222
246- /**
247- * @test
248- */
223+ #[Test]
249224 public function http_client_options_can_be_configured (): void
250225 {
251226 $ projectName = $ this ->app ->config ->get ('firebase.default ' );
@@ -263,9 +238,7 @@ public function http_client_options_can_be_configured(): void
263238 $ this ->assertSame ([RetryMiddleware::class], $ httpClientOptions ->guzzleMiddlewares ());
264239 }
265240
266- /**
267- * @test
268- */
241+ #[Test]
269242 public function it_uses_the_laravel_cache_as_verifier_cache (): void
270243 {
271244 $ projectName = $ this ->app ->config ->get ('firebase.default ' );
@@ -276,9 +249,7 @@ public function it_uses_the_laravel_cache_as_verifier_cache(): void
276249 $ this ->assertInstanceOf (CacheItemPoolInterface::class, $ property ->getValue ($ factory ));
277250 }
278251
279- /**
280- * @test
281- */
252+ #[Test]
282253 public function it_overrides_the_default_firestore_database (): void
283254 {
284255 config (['firebase.projects.app.firestore.database ' => 'override-database ' ]);
@@ -290,9 +261,7 @@ public function it_overrides_the_default_firestore_database(): void
290261 $ this ->assertEquals ('override-database ' , $ property ->getValue ($ factory )['database ' ]);
291262 }
292263
293- /**
294- * @test
295- */
264+ #[Test]
296265 public function it_uses_the_laravel_cache_as_auth_token_cache (): void
297266 {
298267 $ projectName = $ this ->app ->config ->get ('firebase.default ' );
0 commit comments