1717use Zenstruck \Filesystem \Node \File \PendingFile ;
1818use Zenstruck \Tests \Filesystem \Doctrine \DoctrineTestCase ;
1919
20- use function Zenstruck \Foundry \repository ;
20+ use function Zenstruck \Foundry \Persistence \ repository ;
2121
2222/**
2323 * @author Kevin Bond <kevinbond@gmail.com>
@@ -56,7 +56,7 @@ public function files_deleted_on_remove(int $num): void
5656 $ this ->filesystem ()->assertExists ('some/file.txt ' );
5757 $ this ->filesystem ()->assertExists ('some/image.png ' );
5858
59- $ fromDb = repository ($ class )->first ()-> object () ;
59+ $ fromDb = repository ($ class )->first ();
6060
6161 $ this ->em ()->remove ($ fromDb );
6262 $ this ->em ()->flush ();
@@ -87,7 +87,7 @@ public function files_deleted_on_change(int $num): void
8787 $ this ->filesystem ()->assertExists ('some/file.txt ' );
8888 $ this ->filesystem ()->assertExists ('some/image.png ' );
8989
90- $ fromDb = repository ($ class )->first ()-> object () ;
90+ $ fromDb = repository ($ class )->first ();
9191
9292 $ fromDb ->{'setFile ' .$ num }($ this ->filesystem ()->write ('some/new-file.txt ' , 'content3 ' ));
9393 $ object ->{'setImage ' .$ num }($ this ->filesystem ()->write ('some/new-image.png ' , fixture ('metadata.jpg ' ))->ensureImage ());
@@ -118,7 +118,7 @@ public function files_deleted_on_set_null(int $num): void
118118 $ this ->filesystem ()->assertExists ('some/file.txt ' );
119119 $ this ->filesystem ()->assertExists ('some/image.png ' );
120120
121- $ fromDb = repository ($ class )->first ()-> object () ;
121+ $ fromDb = repository ($ class )->first ();
122122
123123 $ fromDb ->{'setFile ' .$ num }(null );
124124 $ object ->{'setImage ' .$ num }(null );
@@ -149,7 +149,7 @@ public function files_stored_as_path_not_deleted_if_path_the_same(int $num): voi
149149 $ this ->flushAndAssertNoChangesFor ($ object );
150150 $ this ->em ()->clear ();
151151
152- $ fromDb = repository ($ class )->first ()-> object () ;
152+ $ fromDb = repository ($ class )->first ();
153153
154154 $ this ->assertSame ('new content ' , $ this ->loadMappingFor ($ fromDb )->{'getFile ' .$ num }()->contents ());
155155 }
@@ -272,7 +272,7 @@ public function metadata_is_pulled_from_attributes(): void
272272
273273 $ this ->filesystem ()->delete ('some/image.png ' );
274274
275- $ fromDb = repository ($ class )->first ()-> object () ;
275+ $ fromDb = repository ($ class )->first ();
276276
277277 /** @var Image $image */
278278 $ image = $ fromDb ->getImage4 ();
@@ -325,7 +325,7 @@ public function persist_and_update_file_with_different_filesystem(): void
325325 $ this ->em ()->flush ();
326326 $ this ->em ()->clear ();
327327
328- $ fromDb = repository ($ class )->first ()-> object () ;
328+ $ fromDb = repository ($ class )->first ();
329329 $ this ->loadMappingFor ($ fromDb );
330330
331331 $ file = $ fromDb ->getFile1 ();
@@ -339,7 +339,7 @@ public function persist_and_update_file_with_different_filesystem(): void
339339 $ this ->em ()->flush ();
340340 $ this ->em ()->clear ();
341341
342- $ fromDb = repository ($ class )->first ()-> object () ;
342+ $ fromDb = repository ($ class )->first ();
343343 $ this ->loadMappingFor ($ fromDb );
344344
345345 $ file = $ fromDb ->getFile1 ();
0 commit comments