Skip to content

Commit 4df1e12

Browse files
committed
Use expectExceptionMessageExact() in tests
1 parent 2f96653 commit 4df1e12

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tests/BigDecimalTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4111,21 +4111,21 @@ public static function providerFromFloatExact(): Generator
41114111
public function testFromFloatExactNan(): void
41124112
{
41134113
$this->expectException(InvalidArgumentException::class);
4114-
$this->expectExceptionMessage('Cannot convert NaN to a BigDecimal.');
4114+
$this->expectExceptionMessageExact('Cannot convert NaN to a BigDecimal.');
41154115
BigDecimal::fromFloatExact(NAN);
41164116
}
41174117

41184118
public function testFromFloatExactInf(): void
41194119
{
41204120
$this->expectException(InvalidArgumentException::class);
4121-
$this->expectExceptionMessage('Cannot convert INF to a BigDecimal.');
4121+
$this->expectExceptionMessageExact('Cannot convert INF to a BigDecimal.');
41224122
BigDecimal::fromFloatExact(INF);
41234123
}
41244124

41254125
public function testFromFloatExactNegativeInf(): void
41264126
{
41274127
$this->expectException(InvalidArgumentException::class);
4128-
$this->expectExceptionMessage('Cannot convert -INF to a BigDecimal.');
4128+
$this->expectExceptionMessageExact('Cannot convert -INF to a BigDecimal.');
41294129
BigDecimal::fromFloatExact(-INF);
41304130
}
41314131

@@ -4172,21 +4172,21 @@ public static function providerFromFloatShortest(): Generator
41724172
public function testFromFloatShortestNan(): void
41734173
{
41744174
$this->expectException(InvalidArgumentException::class);
4175-
$this->expectExceptionMessage('Cannot convert NaN to a BigDecimal.');
4175+
$this->expectExceptionMessageExact('Cannot convert NaN to a BigDecimal.');
41764176
BigDecimal::fromFloatShortest(NAN);
41774177
}
41784178

41794179
public function testFromFloatShortestInf(): void
41804180
{
41814181
$this->expectException(InvalidArgumentException::class);
4182-
$this->expectExceptionMessage('Cannot convert INF to a BigDecimal.');
4182+
$this->expectExceptionMessageExact('Cannot convert INF to a BigDecimal.');
41834183
BigDecimal::fromFloatShortest(INF);
41844184
}
41854185

41864186
public function testFromFloatShortestNegativeInf(): void
41874187
{
41884188
$this->expectException(InvalidArgumentException::class);
4189-
$this->expectExceptionMessage('Cannot convert -INF to a BigDecimal.');
4189+
$this->expectExceptionMessageExact('Cannot convert -INF to a BigDecimal.');
41904190
BigDecimal::fromFloatShortest(-INF);
41914191
}
41924192

0 commit comments

Comments
 (0)