Skip to content

Commit d8ce3a8

Browse files
Uses Attribute for environment definition.
1 parent 0db2da5 commit d8ce3a8

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/ServiceProviderTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Laragear\Preload\Preloader;
1212
use Laragear\Preload\PreloadServiceProvider;
1313

14+
use Orchestra\Testbench\Attributes\DefineEnvironment;
1415
use function get_class;
1516
use function method_exists;
1617

@@ -49,9 +50,7 @@ protected function usesProductionEnvironment(Application $app): void
4950
$app['env'] = 'production';
5051
}
5152

52-
/**
53-
* @define-env usesProductionEnvironment
54-
*/
53+
#[DefineEnvironment('usesProductionEnvironment')]
5554
public function test_registers_global_middleware_on_production(): void
5655
{
5756
$http = $this->app->make(Kernel::class);
@@ -68,9 +67,7 @@ protected function setConfigEnableTrue(Application $app): void
6867
$app->make('config')->set('preload.enabled', true);
6968
}
7069

71-
/**
72-
* @define-env setConfigEnableTrue
73-
*/
70+
#[DefineEnvironment('setConfigEnableTrue')]
7471
public function test_registers_global_middleware_when_config_is_true(): void
7572
{
7673
$http = $this->app->make(Kernel::class);

0 commit comments

Comments
 (0)