@@ -39,8 +39,7 @@ public function tearDown(): void
3939 parent ::tearDown ();
4040 }
4141
42- /** @test */
43- function basic_usage ()
42+ function test_basic_usage ()
4443 {
4544 $ this ->assertEquals (3 , Foo::count ());
4645 $ this ->assertEquals ('bar ' , Foo::first ()->foo );
@@ -50,8 +49,7 @@ function basic_usage()
5049 $ this ->assertEquals ('lob ' , Bar::whereBob ('lob ' )->first ()->bob );
5150 }
5251
53- /** @test */
54- function columns_with_varying_types ()
52+ function test_columns_with_varying_types ()
5553 {
5654 $ row = ModelWithVaryingTypeColumns::first ();
5755 $ connectionBuilder = ModelWithVaryingTypeColumns::resolveConnection ()->getSchemaBuilder ();
@@ -65,8 +63,7 @@ function_exists('\Orchestra\Testbench\laravel_version_compare') && laravel_versi
6563 $ this ->assertEquals (null , $ row ->null );
6664 }
6765
68- /** @test */
69- function model_with_custom_schema ()
66+ function test_model_with_custom_schema ()
7067 {
7168 ModelWithCustomSchema::count ();
7269 $ connectionBuilder = ModelWithCustomSchema::resolveConnection ()->getSchemaBuilder ();
@@ -80,17 +77,15 @@ function_exists('\Orchestra\Testbench\laravel_version_compare') && laravel_versi
8077 );
8178 }
8279
83- /** @test */
84- function models_using_the_get_rows_property_arent_cached ()
80+ function test_models_using_the_get_rows_property_arent_cached ()
8581 {
8682 Bar::$ hasBeenAccessedBefore = false ;
8783 $ this ->assertEquals (2 , Bar::count ());
8884 Bar::resetStatics ();
8985 $ this ->assertEquals (3 , Bar::count ());
9086 }
9187
92- /** @test */
93- function uses_in_memory_if_the_cache_directory_is_not_writeable_or_not_found ()
88+ function test_uses_in_memory_if_the_cache_directory_is_not_writeable_or_not_found ()
9489 {
9590 config (['sushi.cache-path ' => $ path = __DIR__ . '/non-existant-path ' ]);
9691
@@ -100,8 +95,7 @@ function uses_in_memory_if_the_cache_directory_is_not_writeable_or_not_found()
10095 $ this ->assertEquals (':memory: ' , (new Foo )->getConnection ()->getDatabaseName ());
10196 }
10297
103- /** @test */
104- function caches_sqlite_file_if_storage_cache_folder_is_available ()
98+ function test_caches_sqlite_file_if_storage_cache_folder_is_available ()
10599 {
106100 Foo::count ();
107101
@@ -112,8 +106,7 @@ function caches_sqlite_file_if_storage_cache_folder_is_available()
112106 );
113107 }
114108
115- /** @test */
116- function avoids_error_when_creating_database_concurrently ()
109+ function test_avoids_error_when_creating_database_concurrently ()
117110 {
118111 $ actualFactory = app (ConnectionFactory::class);
119112 $ actualConnection = $ actualFactory ->make ([
@@ -144,30 +137,26 @@ function avoids_error_when_creating_database_concurrently()
144137 }
145138
146139 /**
147- * @test
148140 * @group skipped
149- * * /
150- function uses_same_cache_between_requests ()
141+ */
142+ function test_uses_same_cache_between_requests ()
151143 {
152144 $ this ->markTestSkipped ("I can't find a good way to test this right now. " );
153145 }
154146
155- /** @test */
156- function adds_primary_key_if_needed ()
147+ function test_adds_primary_key_if_needed ()
157148 {
158149 $ this ->assertEquals ([5 ,6 ], ModelWithNonStandardKeys::orderBy ('id ' )->pluck ('id ' )->toArray ());
159150 $ this ->assertEquals (1 , Foo::find (1 )->getKey ());
160151 }
161152
162153
163- /** @test */
164- function it_returns_an_empty_collection ()
154+ function test_it_returns_an_empty_collection ()
165155 {
166156 $ this ->assertEquals (0 , Blank::count ());
167157 }
168158
169- /** @test */
170- function can_use_exists_validation_rule ()
159+ function test_can_use_exists_validation_rule ()
171160 {
172161 ModelWithNonStandardKeys::all ();
173162 Foo::all ();
@@ -185,22 +174,15 @@ function can_use_exists_validation_rule()
185174 : $ this ->assertFalse (Validator::make (['bob ' => 'ble ' ], ['bob ' => 'exists: ' .ModelWithNonStandardKeys::class.'.model_with_non_standard_keys ' ])->passes ());
186175 }
187176
188- /** @test */
189- public function it_runs_method_after_migration_when_defined ()
177+ public function test_it_runs_method_after_migration_when_defined ()
190178 {
191179 $ model = ModelWithAddedTableOperations::all ();
192180 $ this ->assertEquals ('columnWasAdded ' , $ model ->first ()->columnAdded , 'The runAfterMigrating method was not triggered. ' );
193181 }
194182
195- /**
196- * @test
197- * @define-env usesSqliteConnection
198- * */
199- function sushi_models_can_relate_to_models_in_regular_sqlite_databases ()
183+ function test_sushi_models_can_relate_to_models_in_regular_sqlite_databases ()
200184 {
201- if (! trait_exists ('\Orchestra\Testbench\Concerns\HandlesAnnotations ' )) {
202- $ this ->markTestSkipped ('Requires HandlesAnnotation trait to define sqlite connection using PHPUnit annotation ' );
203- }
185+ $ this ->usesSqliteConnection ($ this ->app );
204186
205187 $ this ->loadMigrationsFrom (__DIR__ . '/database/migrations ' );
206188 $ this ->artisan ('migrate ' , ['--database ' => 'testbench-sqlite ' ])->run ();
0 commit comments