@@ -326,13 +326,7 @@ public function formatTypeDoubleWithCurrencyStyleProvider()
326
326
*/
327
327
public function testFormatTypeCurrency ($ formatter , $ value )
328
328
{
329
- if (\PHP_VERSION_ID >= 80000 ) {
330
- $ this ->expectException (\ValueError::class);
331
- } elseif (method_exists ($ this , 'expectWarning ' )) {
332
- $ this ->expectWarning ();
333
- } else {
334
- $ this ->expectException (Warning::class);
335
- }
329
+ $ this ->expectException (\ValueError::class);
336
330
337
331
$ formatter ->format ($ value , NumberFormatter::TYPE_CURRENCY );
338
332
}
@@ -342,9 +336,7 @@ public function testFormatTypeCurrency($formatter, $value)
342
336
*/
343
337
public function testFormatTypeCurrencyReturn ($ formatter , $ value )
344
338
{
345
- if (\PHP_VERSION_ID >= 80000 ) {
346
- $ this ->expectException (\ValueError::class);
347
- }
339
+ $ this ->expectException (\ValueError::class);
348
340
349
341
$ this ->assertFalse (@$ formatter ->format ($ value , NumberFormatter::TYPE_CURRENCY ));
350
342
}
@@ -705,13 +697,7 @@ public function parseProvider()
705
697
706
698
public function testParseTypeDefault ()
707
699
{
708
- if (\PHP_VERSION_ID >= 80000 ) {
709
- $ this ->expectException (\ValueError::class);
710
- } elseif (method_exists ($ this , 'expectWarning ' )) {
711
- $ this ->expectWarning ();
712
- } else {
713
- $ this ->expectException (Warning::class);
714
- }
700
+ $ this ->expectException (\ValueError::class);
715
701
716
702
$ formatter = $ this ->getNumberFormatter ('en ' , NumberFormatter::DECIMAL );
717
703
$ formatter ->parse ('1 ' , NumberFormatter::TYPE_DEFAULT );
@@ -831,13 +817,7 @@ public function parseTypeDoubleProvider()
831
817
832
818
public function testParseTypeCurrency ()
833
819
{
834
- if (\PHP_VERSION_ID >= 80000 ) {
835
- $ this ->expectException (\ValueError::class);
836
- } elseif (method_exists ($ this , 'expectWarning ' )) {
837
- $ this ->expectWarning ();
838
- } else {
839
- $ this ->expectException (Warning::class);
840
- }
820
+ $ this ->expectException (\ValueError::class);
841
821
842
822
$ formatter = $ this ->getNumberFormatter ('en ' , NumberFormatter::DECIMAL );
843
823
$ formatter ->parse ('1 ' , NumberFormatter::TYPE_CURRENCY );
0 commit comments