@@ -324,7 +324,9 @@ public function formatTypeDoubleWithCurrencyStyleProvider()
324
324
*/
325
325
public function testFormatTypeCurrency ($ formatter , $ value )
326
326
{
327
- if (method_exists ($ this , 'expectWarning ' )) {
327
+ if (\PHP_VERSION_ID >= 80000 ) {
328
+ $ this ->expectException (\ValueError::class);
329
+ } elseif (method_exists ($ this , 'expectWarning ' )) {
328
330
$ this ->expectWarning ();
329
331
} else {
330
332
$ this ->expectException (Warning::class);
@@ -338,6 +340,10 @@ public function testFormatTypeCurrency($formatter, $value)
338
340
*/
339
341
public function testFormatTypeCurrencyReturn ($ formatter , $ value )
340
342
{
343
+ if (\PHP_VERSION_ID >= 80000 ) {
344
+ $ this ->expectException (\ValueError::class);
345
+ }
346
+
341
347
$ this ->assertFalse (@$ formatter ->format ($ value , NumberFormatter::TYPE_CURRENCY ));
342
348
}
343
349
@@ -709,7 +715,9 @@ public function parseProvider()
709
715
710
716
public function testParseTypeDefault ()
711
717
{
712
- if (method_exists ($ this , 'expectWarning ' )) {
718
+ if (\PHP_VERSION_ID >= 80000 ) {
719
+ $ this ->expectException (\ValueError::class);
720
+ } elseif (method_exists ($ this , 'expectWarning ' )) {
713
721
$ this ->expectWarning ();
714
722
} else {
715
723
$ this ->expectException (Warning::class);
@@ -833,7 +841,9 @@ public function parseTypeDoubleProvider()
833
841
834
842
public function testParseTypeCurrency ()
835
843
{
836
- if (method_exists ($ this , 'expectWarning ' )) {
844
+ if (\PHP_VERSION_ID >= 80000 ) {
845
+ $ this ->expectException (\ValueError::class);
846
+ } elseif (method_exists ($ this , 'expectWarning ' )) {
837
847
$ this ->expectWarning ();
838
848
} else {
839
849
$ this ->expectException (Warning::class);
0 commit comments