@@ -117,6 +117,7 @@ public function test_dummy_epg_respects_date_range()
117117 $ response ->assertSuccessful ();
118118
119119 $ data = $ response ->json ();
120+ $ channel ->refresh (); // Refresh to get latest data
120121 $ channelId = $ channel ->channel ?? $ channel ->id ;
121122 $ programmes = $ data ['programmes ' ][$ channelId ] ?? [];
122123
@@ -151,6 +152,7 @@ public function test_dummy_epg_not_generated_when_disabled()
151152 $ response ->assertSuccessful ();
152153
153154 $ data = $ response ->json ();
155+ $ channel ->refresh (); // Refresh to get latest data
154156 $ channelId = $ channel ->channel ?? $ channel ->id ;
155157
156158 // Programmes should be empty or not include the channel without EPG
@@ -181,6 +183,7 @@ public function test_dummy_epg_category_can_be_disabled()
181183 $ response ->assertSuccessful ();
182184
183185 $ data = $ response ->json ();
186+ $ channel ->refresh (); // Refresh to get latest data
184187 $ channelId = $ channel ->channel ?? $ channel ->id ;
185188 $ programmes = $ data ['programmes ' ][$ channelId ] ?? [];
186189
@@ -248,6 +251,7 @@ public function test_mixed_epg_and_dummy_epg_channels()
248251 $ this ->assertCount (2 , $ data ['channels ' ]);
249252
250253 // Channel without EPG should have dummy programmes
254+ $ channelWithoutEpg ->refresh (); // Refresh to get latest data
251255 $ channelId = $ channelWithoutEpg ->channel ?? $ channelWithoutEpg ->id ;
252256 $ this ->assertArrayHasKey ($ channelId , $ data ['programmes ' ]);
253257 $ this ->assertNotEmpty ($ data ['programmes ' ][$ channelId ]);
@@ -296,6 +300,7 @@ public function test_dummy_epg_with_custom_length()
296300 $ response ->assertSuccessful ();
297301
298302 $ data = $ response ->json ();
303+ $ channel ->refresh (); // Refresh to get latest data
299304 $ channelId = $ channel ->channel ?? $ channel ->id ;
300305 $ programmes = $ data ['programmes ' ][$ channelId ] ?? [];
301306
0 commit comments