@@ -324,7 +324,9 @@ public function formatTypeDoubleWithCurrencyStyleProvider()
324324 */
325325 public function testFormatTypeCurrency ($ formatter , $ value )
326326 {
327- if (method_exists ($ this , 'expectWarning ' )) {
327+ if (\PHP_VERSION_ID >= 80000 ) {
328+ $ this ->expectException (\ValueError::class);
329+ } elseif (method_exists ($ this , 'expectWarning ' )) {
328330 $ this ->expectWarning ();
329331 } else {
330332 $ this ->expectException (Warning::class);
@@ -338,6 +340,10 @@ public function testFormatTypeCurrency($formatter, $value)
338340 */
339341 public function testFormatTypeCurrencyReturn ($ formatter , $ value )
340342 {
343+ if (\PHP_VERSION_ID >= 80000 ) {
344+ $ this ->expectException (\ValueError::class);
345+ }
346+
341347 $ this ->assertFalse (@$ formatter ->format ($ value , NumberFormatter::TYPE_CURRENCY ));
342348 }
343349
@@ -709,7 +715,9 @@ public function parseProvider()
709715
710716 public function testParseTypeDefault ()
711717 {
712- if (method_exists ($ this , 'expectWarning ' )) {
718+ if (\PHP_VERSION_ID >= 80000 ) {
719+ $ this ->expectException (\ValueError::class);
720+ } elseif (method_exists ($ this , 'expectWarning ' )) {
713721 $ this ->expectWarning ();
714722 } else {
715723 $ this ->expectException (Warning::class);
@@ -833,7 +841,9 @@ public function parseTypeDoubleProvider()
833841
834842 public function testParseTypeCurrency ()
835843 {
836- if (method_exists ($ this , 'expectWarning ' )) {
844+ if (\PHP_VERSION_ID >= 80000 ) {
845+ $ this ->expectException (\ValueError::class);
846+ } elseif (method_exists ($ this , 'expectWarning ' )) {
837847 $ this ->expectWarning ();
838848 } else {
839849 $ this ->expectException (Warning::class);
0 commit comments