@@ -116,7 +116,7 @@ public function it_can_refresh_after_update_with_browser(): void
116116 }
117117
118118 #[Test]
119- public function it_can_refresh_twice_after_update_with_browser (): void
119+ public function it_can_refresh_twice_using_http_client (): void
120120 {
121121 $ client = self ::createClient ();
122122
@@ -133,12 +133,26 @@ public function it_can_refresh_twice_after_update_with_browser(): void
133133 }
134134
135135 #[Test]
136- #[Depends('it_can_refresh_after_update_with_browser ' )]
136+ #[Depends('it_can_refresh_twice_using_http_client ' )]
137137 public function tracker_is_empty_after_test (): void
138138 {
139139 self ::assertSame (0 , PersistedObjectsTracker::countObjects ());
140140 }
141141
142+ #[Test]
143+ public function it_can_refresh_the_objects_after_kernel_shutdown (): void
144+ {
145+ $ object = $ this ->factory ()->create ();
146+ self ::assertSame ('default1 ' , $ object ->getProp1 ());
147+
148+ self ::ensureKernelShutdown ();
149+ $ client = self ::createClient ();
150+
151+ $ client ->request ('GET ' , "/ {$ this ->dbms ()}/update/ {$ object ->id }/foo " );
152+ self ::assertResponseIsSuccessful ();
153+ self ::assertSame ('foo ' , $ object ->getProp1 ());
154+ }
155+
142156 #[Test]
143157 #[TestWith(['deleteDirectlyInDb ' => false , 'clearOM ' => true ])]
144158 #[TestWith(['deleteDirectlyInDb ' => false , 'clearOM ' => false ])]
@@ -281,7 +295,7 @@ public static function provideRepositoryMethod(): iterable
281295 }
282296
283297 #[Test]
284- public function it_can_refresh_object_fetched_find_and_id (): void
298+ public function it_can_refresh_object_fetched_using_find_and_an_id (): void
285299 {
286300 $ id = $ this ->factory ()->create ()->id ;
287301
@@ -290,7 +304,7 @@ public function it_can_refresh_object_fetched_find_and_id(): void
290304 PersistedObjectsTracker::reset ();
291305
292306 self ::assertNull (
293- $ this ->factory ()::repository ()->find (43 )
307+ $ this ->factory ()::repository ()->find (99999 )
294308 );
295309
296310 $ object = $ this ->factory ()::repository ()->find ($ id );
0 commit comments