Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit c41f73d

Browse files
committed
Simplified one test
1 parent e566cb0 commit c41f73d

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tests/Decimal/DecimalFromIntegerTest.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@
88

99
class DecimalFromIntegerTest extends PHPUnit_Framework_TestCase
1010
{
11+
/**
12+
* @expectedException Litipk\Exceptions\InvalidArgumentTypeException
13+
* @expectedExceptionMessage $intValue must be of type int
14+
*/
1115
public function testNoInteger()
1216
{
13-
$catched = false;
14-
15-
try {
16-
$n = Decimal::fromInteger(5.1);
17-
} catch (Exception $e) {
18-
$catched = true;
19-
}
20-
21-
$this->assertTrue($catched);
17+
Decimal::fromInteger(5.1);
2218
}
2319
}

0 commit comments

Comments
 (0)