@@ -19,7 +19,7 @@ final class FirebaseProjectManagerTest extends TestCase
1919{
2020 protected function defineEnvironment ($ app ): void
2121 {
22- $ app ['config ' ]->set ('firebase.projects.app.credentials ' , __DIR__ . '/_fixtures/service_account.json ' );
22+ $ app ['config ' ]->set ('firebase.projects.app.credentials ' , __DIR__ . '/_fixtures/service_account.json ' );
2323 }
2424
2525 /**
@@ -69,12 +69,12 @@ public function calls_are_passed_to_default_project(): void
6969 public function credentials_can_be_configured_using_a_json_file (): void
7070 {
7171 // Reference credentials
72- $ credentialsPath = \realpath (__DIR__ . '/_fixtures/service_account.json ' );
72+ $ credentialsPath = \realpath (__DIR__ . '/_fixtures/service_account.json ' );
7373 $ credentials = \json_decode (\file_get_contents ($ credentialsPath ), true );
7474
7575 // Set configuration and retrieve project
7676 $ projectName = 'app ' ;
77- $ this ->app ->config ->set ('firebase.projects. ' . $ projectName . '.credentials ' , \realpath (__DIR__ . '/_fixtures/service_account.json ' ));
77+ $ this ->app ->config ->set ('firebase.projects. ' . $ projectName. '.credentials ' , \realpath (__DIR__ . '/_fixtures/service_account.json ' ));
7878 $ factory = $ this ->factoryForProject ($ projectName );
7979
8080 // Retrieve service account
@@ -90,12 +90,12 @@ public function credentials_can_be_configured_using_a_json_file(): void
9090 public function json_file_credentials_can_be_used_using_the_deprecated_configuration_entry (): void
9191 {
9292 // Reference credentials
93- $ credentialsPath = \realpath (__DIR__ . '/_fixtures/service_account.json ' );
93+ $ credentialsPath = \realpath (__DIR__ . '/_fixtures/service_account.json ' );
9494 $ credentials = \json_decode (\file_get_contents ($ credentialsPath ), true );
9595
9696 // Set configuration and retrieve project
9797 $ projectName = 'app ' ;
98- $ this ->app ->config ->set ('firebase.projects. ' . $ projectName . '.credentials.file ' , \realpath (__DIR__ . '/_fixtures/service_account.json ' ));
98+ $ this ->app ->config ->set ('firebase.projects. ' . $ projectName. '.credentials.file ' , \realpath (__DIR__ . '/_fixtures/service_account.json ' ));
9999 $ factory = $ this ->factoryForProject ($ projectName );
100100
101101 // Retrieve service account
@@ -112,7 +112,7 @@ public function credentials_can_be_configured_using_an_array(): void
112112 {
113113 // Set configuration and retrieve project
114114 $ projectName = 'app ' ;
115- $ this ->app ->config ->set ('firebase.projects. ' . $ projectName . '.credentials ' , $ credentials = [
115+ $ this ->app ->config ->set ('firebase.projects. ' . $ projectName. '.credentials ' , $ credentials = [
116116 'type ' => 'service_account ' ,
117117 'project_id ' => 'project ' ,
118118 'private_key_id ' => 'private_key_id ' ,
@@ -139,19 +139,19 @@ public function credentials_can_be_configured_using_an_array(): void
139139 public function projects_can_have_different_credentials (): void
140140 {
141141 // Reference credentials
142- $ credentialsPath = \realpath (__DIR__ . '/_fixtures/service_account.json ' );
142+ $ credentialsPath = \realpath (__DIR__ . '/_fixtures/service_account.json ' );
143143 $ credentials = \json_decode (\file_get_contents ($ credentialsPath ), true );
144144
145- $ secondCredentialsPath = \realpath (__DIR__ . '/_fixtures/another_service_account.json ' );
145+ $ secondCredentialsPath = \realpath (__DIR__ . '/_fixtures/another_service_account.json ' );
146146 $ secondCredentials = \json_decode (\file_get_contents ($ secondCredentialsPath ), true );
147147
148148 // Project names to use
149149 $ projectName = 'app ' ;
150150 $ secondProjectName = 'another-app ' ;
151151
152152 // Set service accounts explicitly
153- $ this ->app ->config ->set ('firebase.projects. ' . $ projectName . '.credentials ' , \realpath (__DIR__ . '/_fixtures/service_account.json ' ));
154- $ this ->app ->config ->set ('firebase.projects. ' . $ secondProjectName . '.credentials ' , \realpath (__DIR__ . '/_fixtures/another_service_account.json ' ));
153+ $ this ->app ->config ->set ('firebase.projects. ' . $ projectName. '.credentials ' , \realpath (__DIR__ . '/_fixtures/service_account.json ' ));
154+ $ this ->app ->config ->set ('firebase.projects. ' . $ secondProjectName. '.credentials ' , \realpath (__DIR__ . '/_fixtures/another_service_account.json ' ));
155155
156156 // Retrieve factories and service accounts
157157 $ factory = $ this ->factoryForProject ($ projectName );
@@ -171,8 +171,8 @@ public function projects_can_have_different_credentials(): void
171171 public function the_realtime_database_url_can_be_configured (): void
172172 {
173173 $ projectName = $ this ->app ->config ->get ('firebase.default ' );
174- $ this ->app ->config ->set ('firebase.projects. ' . $ projectName . '.database.url ' , $ url = 'https://domain.tld ' );
175- $ this ->app ->config ->set ('firebase.projects. ' . $ projectName . '.database.auth_variable_override ' , ['uid ' => 'some-uid ' ]);
174+ $ this ->app ->config ->set ('firebase.projects. ' . $ projectName. '.database.url ' , $ url = 'https://domain.tld ' );
175+ $ this ->app ->config ->set ('firebase.projects. ' . $ projectName. '.database.auth_variable_override ' , ['uid ' => 'some-uid ' ]);
176176
177177 $ database = $ this ->app ->make (Firebase \Contract \Database::class);
178178
@@ -187,7 +187,7 @@ public function the_realtime_database_url_can_be_configured(): void
187187 public function the_dynamic_links_default_domain_can_be_configured (): void
188188 {
189189 $ projectName = $ this ->app ->config ->get ('firebase.default ' );
190- $ this ->app ->config ->set ('firebase.projects. ' . $ projectName . '.dynamic_links.default_domain ' , $ domain = 'https://domain.tld ' );
190+ $ this ->app ->config ->set ('firebase.projects. ' . $ projectName. '.dynamic_links.default_domain ' , $ domain = 'https://domain.tld ' );
191191
192192 $ dynamicLinks = $ this ->app ->make (Firebase \Contract \DynamicLinks::class);
193193
@@ -204,7 +204,7 @@ public function the_dynamic_links_default_domain_can_be_configured(): void
204204 public function the_storage_default_bucket_can_be_configured (): void
205205 {
206206 $ projectName = $ this ->app ->config ->get ('firebase.default ' );
207- $ this ->app ->config ->set ('firebase.projects. ' . $ projectName . '.storage.default_bucket ' , $ name = 'my-bucket ' );
207+ $ this ->app ->config ->set ('firebase.projects. ' . $ projectName. '.storage.default_bucket ' , $ name = 'my-bucket ' );
208208
209209 $ storage = $ this ->app ->make (Firebase \Contract \Storage::class);
210210
@@ -219,7 +219,7 @@ public function the_storage_default_bucket_can_be_configured(): void
219219 public function logging_can_be_configured (): void
220220 {
221221 $ projectName = $ this ->app ->config ->get ('firebase.default ' );
222- $ this ->app ->config ->set ('firebase.projects. ' . $ projectName . '.logging.http_log_channel ' , 'stack ' );
222+ $ this ->app ->config ->set ('firebase.projects. ' . $ projectName. '.logging.http_log_channel ' , 'stack ' );
223223
224224 $ factory = $ this ->factoryForProject ($ projectName );
225225
@@ -234,7 +234,7 @@ public function logging_can_be_configured(): void
234234 public function debug_logging_can_be_configured (): void
235235 {
236236 $ projectName = $ this ->app ->config ->get ('firebase.default ' );
237- $ this ->app ->config ->set ('firebase.projects. ' . $ projectName . '.logging.http_debug_log_channel ' , 'stack ' );
237+ $ this ->app ->config ->set ('firebase.projects. ' . $ projectName. '.logging.http_debug_log_channel ' , 'stack ' );
238238
239239 $ factory = $ this ->factoryForProject ($ projectName );
240240
@@ -249,9 +249,9 @@ public function debug_logging_can_be_configured(): void
249249 public function http_client_options_can_be_configured (): void
250250 {
251251 $ projectName = $ this ->app ->config ->get ('firebase.default ' );
252- $ this ->app ->config ->set ('firebase.projects. ' . $ projectName . '.http_client_options.proxy ' , 'proxy.domain.tld ' );
253- $ this ->app ->config ->set ('firebase.projects. ' . $ projectName . '.http_client_options.timeout ' , 1.23 );
254- $ this ->app ->config ->set ('firebase.projects. ' . $ projectName . '.http_client_options.guzzle_middlewares ' , [RetryMiddleware::class]);
252+ $ this ->app ->config ->set ('firebase.projects. ' . $ projectName. '.http_client_options.proxy ' , 'proxy.domain.tld ' );
253+ $ this ->app ->config ->set ('firebase.projects. ' . $ projectName. '.http_client_options.timeout ' , 1.23 );
254+ $ this ->app ->config ->set ('firebase.projects. ' . $ projectName. '.http_client_options.guzzle_middlewares ' , [RetryMiddleware::class]);
255255
256256 $ factory = $ this ->factoryForProject ($ projectName );
257257
@@ -289,7 +289,7 @@ public function it_uses_the_laravel_cache_as_auth_token_cache(): void
289289 $ this ->assertInstanceOf (CacheItemPoolInterface::class, $ property ->getValue ($ factory ));
290290 }
291291
292- private function factoryForProject (? string $ project = null ): Factory
292+ private function factoryForProject (string $ project = null ): Factory
293293 {
294294 $ project = $ this ->app ->make (FirebaseProjectManager::class)->project ($ project );
295295
0 commit comments