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

Commit 858cdb3

Browse files
committed
Simplified test
1 parent c41f73d commit 858cdb3

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tests/Decimal/DecimalFromStringTest.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,13 @@ public function testNoString()
8080
$this->assertTrue($catched);
8181
}
8282

83+
/**
84+
* @expectedException \InvalidArgumentException
85+
* @expectedExceptionMessage $strValue must be a string that represents uniquely a float point number
86+
*/
8387
public function testBadString()
8488
{
85-
$catched = false;
86-
87-
try {
88-
$n = Decimal::fromString('hello world');
89-
} catch (Exception $e) {
90-
$catched = true;
91-
}
92-
93-
$this->assertTrue($catched);
89+
Decimal::fromString('hello world');
9490
}
9591

9692
public function testWithScale()

0 commit comments

Comments
 (0)