matlab.unittest.fixtures.EnvironmentVariableFixture Class
Namespace: matlab.unittest.fixtures
Superclasses: matlab.unittest.fixtures.Fixture
Description
The matlab.unittest.fixtures.EnvironmentVariableFixture class provides a
fixture for setting an operating system environment variable. When the testing framework sets
up the fixture, the fixture sets the specified environment variable to the intended value.
When the framework tears down the fixture, the fixture restores the specified environment
variable to its original state.
The matlab.unittest.fixtures.EnvironmentVariableFixture class is a handle class.
Creation
Description
fixture = matlab.unittest.fixtures.EnvironmentVariableFixture(name,value)
creates a fixture for setting the environment variable name to
value. During fixture setup, if name exists as an
environment variable, then the fixture replaces its current value with
value. If environment variable name does not
exist, then the fixture creates an environment variable named name and
assigns value to it.
The name and value inputs set the
Name and Value properties of fixture.
Properties
Examples
Version History
Introduced in R2023a
See Also
applyFixture | getenv | setenv | unsetenv