Skip to content

Provide #[WithEnvironmentVariable()] attribute to set env variables #6116

@nikophil

Description

@nikophil

Hello,

would you accept a PR with a new attribute #[WithEnv('name', 'value')] or #[WithEnvironmentVariable('name', 'value')], which will set the given env var and run the test with this env?

This would allow to fully test applications which rely on environment variables for feature flags, for example. Relying on environment variables is quite common these days...

thanks for your answer

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions