Skip to content

Commit

Permalink
Checks for empty errorLocation not errorClass type
Browse files Browse the repository at this point in the history
  • Loading branch information
theoboldalex committed Sep 3, 2023
1 parent 986f3e3 commit 996ac76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Runtime/LambdaRuntimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ private function assertInvocationErrorResult(string $errorClass, string $errorMe
], array_keys($invocationResult));
$this->assertEquals($errorClass, $invocationResult['errorType']);
$this->assertEquals($errorMessage, $invocationResult['errorMessage']);
if ($errorClass === RuntimeException::class) {
if (! empty($errorLocation)) {
$this->assertEquals($errorLocation, $invocationResult['errorLocation']);
}
$this->assertIsArray($invocationResult['stackTrace']);
Expand Down Expand Up @@ -482,7 +482,7 @@ private function assertErrorInLogs(string $errorClass, string $errorMessage, arr
], array_keys($invocationResult));
$this->assertEquals($errorClass, $invocationResult['errorType']);
$this->assertStringContainsString($errorMessage, $invocationResult['errorMessage']);
if ($errorClass === RuntimeException::class) {
if (! empty($errorLocation)) {
$this->assertSame($errorLocation, $invocationResult['errorLocation']);
}
$this->assertIsArray($invocationResult['stack']);
Expand Down

0 comments on commit 996ac76

Please sign in to comment.