From d96c92f9ef815a17ceeb431934de1b2ef82b4c83 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Wed, 18 Oct 2023 09:32:36 +0900 Subject: [PATCH] Update phpunit tests for Byte class with new exception names --- 4dev/tests/Convert/CoreLibsConvertByteTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/4dev/tests/Convert/CoreLibsConvertByteTest.php b/4dev/tests/Convert/CoreLibsConvertByteTest.php index bf49af3b..95838889 100644 --- a/4dev/tests/Convert/CoreLibsConvertByteTest.php +++ b/4dev/tests/Convert/CoreLibsConvertByteTest.php @@ -253,7 +253,8 @@ final class CoreLibsConvertByteTest extends TestCase */ public function testHumanReadableByteFormatException(int $flag): void { - $this->expectException(\Exception::class); + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionCode(1); \CoreLibs\Convert\Byte::humanReadableByteFormat(12, $flag); } @@ -272,7 +273,8 @@ final class CoreLibsConvertByteTest extends TestCase */ public function testStringByteFormatException(int $flag): void { - $this->expectException(\Exception::class); + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionCode(1); \CoreLibs\Convert\Byte::stringByteFormat(12, $flag); } }