File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Dotenv \Tests \Command ;
1313
14+ use PHPUnit \Framework \Attributes \RunInSeparateProcess ;
1415use PHPUnit \Framework \TestCase ;
1516use Symfony \Component \Console \Application ;
1617use Symfony \Component \Console \Helper \FormatterHelper ;
2223
2324class DebugCommandTest extends TestCase
2425{
25- /**
26- * @runInSeparateProcess
27- */
26+ #[RunInSeparateProcess]
2827 public function testErrorOnUninitializedDotenv ()
2928 {
3029 unset($ _SERVER ['SYMFONY_DOTENV_VARS ' ]);
@@ -38,9 +37,7 @@ public function testErrorOnUninitializedDotenv()
3837 $ this ->assertStringContainsString ('[ERROR] Dotenv component is not initialized ' , $ output );
3938 }
4039
41- /**
42- * @runInSeparateProcess
43- */
40+ #[RunInSeparateProcess]
4441 public function testEmptyDotEnvVarsList ()
4542 {
4643 $ _SERVER ['SYMFONY_DOTENV_VARS ' ] = '' ;
@@ -275,9 +272,7 @@ public function testScenario2InProdEnvWithNameFilterPrefix()
275272 $ this ->assertStringContainsString ('TEST 1234 1234 1234 0000 ' , $ output );
276273 }
277274
278- /**
279- * @runInSeparateProcess
280- */
275+ #[RunInSeparateProcess]
281276 public function testCompletion ()
282277 {
283278 $ env = 'prod ' ;
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Dotenv \Tests ;
1313
14+ use PHPUnit \Framework \Attributes \DataProvider ;
1415use PHPUnit \Framework \TestCase ;
1516use Symfony \Component \Dotenv \Dotenv ;
1617use Symfony \Component \Dotenv \Exception \FormatException ;
1718use Symfony \Component \Dotenv \Exception \PathException ;
1819
1920class DotenvTest extends TestCase
2021{
21- /**
22- * @dataProvider getEnvDataWithFormatErrors
23- */
22+ #[DataProvider('getEnvDataWithFormatErrors ' )]
2423 public function testParseWithFormatError ($ data , $ error )
2524 {
2625 $ dotenv = new Dotenv ();
@@ -63,9 +62,7 @@ public static function getEnvDataWithFormatErrors()
6362 return $ tests ;
6463 }
6564
66- /**
67- * @dataProvider getEnvData
68- */
65+ #[DataProvider('getEnvData ' )]
6966 public function testParse ($ data , $ expected )
7067 {
7168 $ dotenv = new Dotenv ();
You can’t perform that action at this time.
0 commit comments