File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,9 @@ public function testItCannotIndexInTheSameNamespace()
5454 SearchableInSameNamespace::create (['name ' => 'test ' ]);
5555 }
5656
57- /** This test create the search index for tests performing search */
58- public function testItCanCreateTheCollection ()
57+ public function setUp (): void
5958 {
60- $ this ->skipIfSearchIndexManagementIsNotSupported ();
61-
62- $ collection = DB ::connection ('mongodb ' )->getCollection ('prefix_scout_users ' );
63- $ collection ->drop ();
59+ parent ::setUp ();
6460
6561 // Init the SQL database with some objects that will be indexed
6662 // Test data copied from Laravel Scout tests
@@ -103,6 +99,15 @@ public function testItCanCreateTheCollection()
10399 }
104100
105101 self ::assertSame (44 , ScoutUser::count ());
102+ }
103+
104+ /** This test create the search index for tests performing search */
105+ public function testItCanCreateTheCollection ()
106+ {
107+ $ this ->skipIfSearchIndexManagementIsNotSupported ();
108+
109+ $ collection = DB ::connection ('mongodb ' )->getCollection ('prefix_scout_users ' );
110+ $ collection ->drop ();
106111
107112 // Recreate the indexes using the artisan commands
108113 // Ensure they return a success exit code (0)
You can’t perform that action at this time.
0 commit comments