Skip to content

Commit

Permalink
Update Environment.php
Browse files Browse the repository at this point in the history
  • Loading branch information
stepapo authored Apr 21, 2023
1 parent a8715ff commit 7844a24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Tester/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public static function setupErrors(): void
} elseif (self::$checkAssertions && !Assert::$counter) {
self::removeOutputBuffers();
echo "\n", Dumper::color('white/red', 'Error: This test forgets to execute an assertion.'), "\n";
self::exit(Job::CODE_FAIL);
} elseif (!getenv(parent::RUNNER) && self::$exitCode !== Job::CODE_SKIP) {
self::exit(Job::CodeFail);
} elseif (!getenv(parent::RUNNER) && self::$exitCode !== Job::CodeSkip) {
echo "\n", (self::$exitCode ? Dumper::color('white/red', 'FAILURE') : Dumper::color('white/green', 'OK')), "\n";
}
});
Expand All @@ -82,7 +82,7 @@ public static function handleException(\Throwable $e): void
self::removeOutputBuffers();
self::$checkAssertions = false;
echo Dumper::dumpException($e);
self::exit($e instanceof AssertException ? Job::CODE_FAIL : Job::CODE_ERROR);
self::exit($e instanceof AssertException ? Job::CodeFail : Job::CodeError);
}


Expand Down

0 comments on commit 7844a24

Please sign in to comment.