diff --git a/src/test/php/websocket/unittest/EnvironmentTest.class.php b/src/test/php/websocket/unittest/EnvironmentTest.class.php index 745f9c2..e414b4f 100755 --- a/src/test/php/websocket/unittest/EnvironmentTest.class.php +++ b/src/test/php/websocket/unittest/EnvironmentTest.class.php @@ -59,4 +59,21 @@ public function properties_from_directory() { public function arguments($arguments) { Assert::equals($arguments, (new Environment('dev', [], $arguments))->arguments()); } + + #[Test] + public function env_variable() { + putenv('TEST=true'); + Assert::equals('true', (new Environment('dev'))->variable('TEST')); + } + + #[Test] + public function unset_variable() { + putenv('TEST'); + Assert::null((new Environment('dev'))->variable('TEST')); + } + + #[Test] + public function export_variable() { + Assert::equals('true', (new Environment('dev'))->export('TEST', 'true')->variable('TEST')); + } } \ No newline at end of file