From 6982c975e56755ad3f222da677ee0301b24b98e1 Mon Sep 17 00:00:00 2001 From: Andy Ford Date: Sat, 19 Aug 2023 17:27:54 +0000 Subject: [PATCH] style: pint --- tests/Api/PluginTest.php | 66 ++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/tests/Api/PluginTest.php b/tests/Api/PluginTest.php index 93387128..8c49f723 100644 --- a/tests/Api/PluginTest.php +++ b/tests/Api/PluginTest.php @@ -40,44 +40,44 @@ public function testItReturnsEmptyPluginApiData() ); } - public function testItReturnsCachedData() - { - // Put some fake data in cache - Cache::remember( - 'plugin_api_response', - Carbon::now()->addMinutes(1), - fn () => [ + public function testItReturnsCachedData() + { + // Put some fake data in cache + Cache::remember( + 'plugin_api_response', + Carbon::now()->addMinutes(1), + fn () => [ + 'events' => [], + 'flight_information_regions' => [], + 'flow_measures' => [], + ] + ); + + FlightInformationRegion::factory()->count(5)->create(); + Event::factory()->count(3)->create(); + + // Should show, if the data weren't cached + $active = FlowMeasure::factory() + ->create(); + + $notStarted = FlowMeasure::factory() + ->notStarted() + ->create(); + + $finished = FlowMeasure::factory() + ->finished() + ->create(); + + $this->get('api/v1/plugin') + ->assertStatus(200) + ->assertExactJson( + [ 'events' => [], 'flight_information_regions' => [], 'flow_measures' => [], ] ); - - FlightInformationRegion::factory()->count(5)->create(); - Event::factory()->count(3)->create(); - - // Should show, if the data weren't cached - $active = FlowMeasure::factory() - ->create(); - - $notStarted = FlowMeasure::factory() - ->notStarted() - ->create(); - - $finished = FlowMeasure::factory() - ->finished() - ->create(); - - $this->get('api/v1/plugin') - ->assertStatus(200) - ->assertExactJson( - [ - 'events' => [], - 'flight_information_regions' => [], - 'flow_measures' => [], - ] - ); - } + } public function testItReturnsPluginApiData() {