Skip to content

Commit e7321df

Browse files
authored
Merge pull request #225 from ghostwriter/bugfix/failing-env-specific-tests-224
Fix env-specific tests
2 parents 49d9580 + aa7dacd commit e7321df

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/unit/Environment/EnvironmentVariablesTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ public function testFailsOnMissingEnvironmentVariables(): void
115115

116116
public function testDebugModeOffEnvironmentVariables(): void
117117
{
118-
// commented to signify a missing env variable.
119-
// Env\set_var('ACTIONS_RUNNER_DEBUG', '');
118+
// missing env variable.
119+
Env\remove_var('ACTIONS_RUNNER_DEBUG');
120+
120121
Env\set_var('GITHUB_TOKEN', 'token');
121122
Env\set_var('SIGNING_SECRET_KEY', 'aaa');
122123
Env\set_var('GITHUB_ORGANISATION', 'bbb');
@@ -128,7 +129,7 @@ public function testDebugModeOffEnvironmentVariables(): void
128129
$importKey = $this->createMock(ImportGpgKeyFromString::class);
129130
$importKey->method('__invoke')->willReturn(SecretKeyId::fromBase16String('aabbccdd'));
130131
$variables = EnvironmentVariables::fromEnvironment($importKey);
131-
self::assertEquals('INFO', $variables->logLevel());
132+
self::assertSame('INFO', $variables->logLevel());
132133
}
133134

134135
public function testDebugModeOnEnvironmentVariables(): void
@@ -146,6 +147,6 @@ public function testDebugModeOnEnvironmentVariables(): void
146147
$importKey->method('__invoke')->willReturn(SecretKeyId::fromBase16String('aabbccdd'));
147148
$variables = EnvironmentVariables::fromEnvironment($importKey);
148149

149-
self::assertEquals('DEBUG', $variables->logLevel());
150+
self::assertSame('DEBUG', $variables->logLevel());
150151
}
151152
}

0 commit comments

Comments
 (0)