From 289712856bb31aa64b38347844e4da59ee150dc0 Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Thu, 3 Oct 2024 17:55:20 +0530 Subject: [PATCH] Replace expectException with try/catch --- tests/Storage/Compression/Algorithms/BrotliTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Storage/Compression/Algorithms/BrotliTest.php b/tests/Storage/Compression/Algorithms/BrotliTest.php index 04c476d7..9cbbf6a9 100644 --- a/tests/Storage/Compression/Algorithms/BrotliTest.php +++ b/tests/Storage/Compression/Algorithms/BrotliTest.php @@ -29,8 +29,11 @@ public function testName() public function testErrorsWhenSettingLevel() { - $this->expectException(InvalidArgumentException::class); - $this->object->setLevel(-1); + try { + $this->object->setLevel(-1); + } catch (InvalidArgumentException $exception) { + $this->assertEquals(InvalidArgumentException::class, get_class($exception)); + } } public function testCompressDecompressWithText()