From 986f3e3c89f46347c4a4836c427c10ab7280a026 Mon Sep 17 00:00:00 2001 From: theoboldalex Date: Sun, 3 Sep 2023 22:10:53 +0100 Subject: [PATCH] Applies fixes for PHPCS errors --- tests/Runtime/LambdaRuntimeTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Runtime/LambdaRuntimeTest.php b/tests/Runtime/LambdaRuntimeTest.php index b84ba8ab6..d84f7644c 100644 --- a/tests/Runtime/LambdaRuntimeTest.php +++ b/tests/Runtime/LambdaRuntimeTest.php @@ -99,8 +99,8 @@ public function test nested exceptions in the handler result in an invo $originalException = new Exception('The original exception.'); $previousException = new RuntimeException('The previous exception.', 0, $originalException); $currentException = new RuntimeException( - 'This is an exception', - 0, + 'This is an exception', + 0, $previousException ); $this->runtime->processNextEvent(function () use ($currentException) { @@ -120,16 +120,16 @@ public function test nested exceptions in the handler result in an invo 'errorMessage' => 'The previous exception.', 'errorLocation' => [ 'file' => $previousException->getFile(), - 'line' => $previousException->getLine() - ] + 'line' => $previousException->getLine(), + ], ], [ 'errorClass' => 'Exception', 'errorMessage' => 'The original exception.', 'errorLocation' => [ 'file' => $originalException->getFile(), - 'line' => $originalException->getLine() - ] + 'line' => $originalException->getLine(), + ], ], ]); } @@ -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 instanceof RuntimeException) { + if ($errorClass === RuntimeException::class) { $this->assertEquals($errorLocation, $invocationResult['errorLocation']); } $this->assertIsArray($invocationResult['stackTrace']); @@ -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 instanceof RuntimeException) { + if ($errorClass === RuntimeException::class) { $this->assertSame($errorLocation, $invocationResult['errorLocation']); } $this->assertIsArray($invocationResult['stack']);