From 98c98c2425b61a1dd07a780b311a61c930fa21be Mon Sep 17 00:00:00 2001 From: Evgymart Date: Sat, 11 Oct 2025 12:21:45 +0300 Subject: [PATCH] Fix expectException call in tests --- tests/TimeSpanTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/TimeSpanTest.php b/tests/TimeSpanTest.php index e40630c..e105c63 100644 --- a/tests/TimeSpanTest.php +++ b/tests/TimeSpanTest.php @@ -567,7 +567,7 @@ public function testAdd(int $firstDays, int $secondDays, int $sumDays): void public function testAddOverflow(): void { - self::expectException(\OutOfBoundsException::class); + $this->expectException(\OutOfBoundsException::class); $tooManyDays = 99_999; $firstSpan = TimeSpan::fromDays($tooManyDays); @@ -592,7 +592,7 @@ public function testSub(int $firstDays, int $secondDays, int $diffDays): void public function testSubOverflow(): void { - self::expectException(\OutOfBoundsException::class); + $this->expectException(\OutOfBoundsException::class); $tooManyDays = 99_999; $zeroSpan = TimeSpan::fromDays(0); @@ -617,7 +617,7 @@ public function testMul(int $days, int|float $times, int $daysProduct): void public function testMulOverflow(): void { - self::expectException(\OutOfBoundsException::class); + $this->expectException(\OutOfBoundsException::class); $tooManyDays = 99_999; $span = TimeSpan::fromDays($tooManyDays); @@ -640,7 +640,7 @@ public function testDiv(int $nanoseconds, int|float $factor, int $nanosecondsQuo public function testDivOverflow(): void { - self::expectException(\OutOfBoundsException::class); + $this->expectException(\OutOfBoundsException::class); $tooManyDays = 99_999; $span = TimeSpan::fromDays($tooManyDays); @@ -650,7 +650,7 @@ public function testDivOverflow(): void public function testDivByZero(): void { - self::expectException(\DivisionByZeroError::class); + $this->expectException(\DivisionByZeroError::class); $span = TimeSpan::fromDays(5); $span->div(0);