File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1111 </testsuites >
1212
1313 <extensions >
14- <bootstrap class =" Zalas\PHPUnit\Globals\AnnotationExtension " />
14+ <bootstrap class =" Zalas\PHPUnit\Globals\Tests\Stub\CombinedExtension " />
1515 </extensions >
1616</phpunit >
Original file line number Diff line number Diff line change 22declare (strict_types=1 );
33
44use PHPUnit \Framework \TestCase ;
5+ use Zalas \PHPUnit \Globals \Attribute \Env ;
6+ use Zalas \PHPUnit \Globals \Attribute \Server ;
57
68class PharTest extends TestCase
79{
@@ -15,6 +17,14 @@ public function test_it_reads_global_variables_from_method_annotations()
1517 $ this ->assertArraySubset (['APP_DEBUG ' => '1 ' ], $ _SERVER );
1618 }
1719
20+ #[Env("APP_ENV " , "test_foo " )]
21+ #[Server("APP_DEBUG " , "1 " )]
22+ public function test_it_reads_global_variables_from_method_attributes ()
23+ {
24+ $ this ->assertArraySubset (['APP_ENV ' => 'test_foo ' ], $ _ENV );
25+ $ this ->assertArraySubset (['APP_DEBUG ' => '1 ' ], $ _SERVER );
26+ }
27+
1828 /**
1929 * Provides a replacement for the assertion deprecated in PHPUnit 8 and removed in PHPUnit 9.
2030 * @param array $subset
You can’t perform that action at this time.
0 commit comments