Skip to content

Commit

Permalink
test: assert multiple environment variables can be set
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed May 8, 2024
1 parent 25f2472 commit 53bc4fb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/phpunit/ProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,14 @@ public function testSetEnv() {
$output = $sut->getOutput();
self::assertStringContainsString("NAME=PHPUnit\n", $output);
}

public function testSetEnv_multiple() {
$sut = new Process("printenv");
$sut->setEnv("NAME", "PHPUnit");
$sut->setEnv("TEST", "setEnv");
$sut->exec();
$output = $sut->getOutput();
self::assertStringContainsString("TEST=setEnv\n", $output);
self::assertStringContainsString("NAME=PHPUnit\n", $output);
}
}

0 comments on commit 53bc4fb

Please sign in to comment.