phpunit-globals icon indicating copy to clipboard operation
phpunit-globals copied to clipboard

Allows to use attributes to define global variables in PHPUnit test cases

Results 4 phpunit-globals issues
Sort by recently updated
recently updated
newest added

```php #[Env('FOO', 'bar')] class ExampleTest extends TestCase { #[ Env('APP_ENV', 'foo'), Env('APP_DEBUG', '0'), Server('APP_ENV', 'bar'), Server('APP_DEBUG', '1')], PutEnv('APP_HOST', 'localhost') ] public function test_global_variables() { $this->assertSame('bar', $_ENV['FOO']); $this->assertSame('foo', $_ENV['APP_ENV']); $this->assertSame('0', $_ENV['APP_DEBUG']);...

help wanted

See https://github.com/jakzal/phpunit-globals/actions/runs/3427119296 ``` Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/upload-release-asset The `set-output` command is deprecated and will...

I like this package very much and helps me setting up my test cases a lot better, so thanks for the work so far! This package is bound to PHPUnit...