@@ -324,7 +324,11 @@ public function formatTypeDoubleWithCurrencyStyleProvider()
324324 */
325325 public function testFormatTypeCurrency ($ formatter , $ value )
326326 {
327- $ this ->expectException (Warning::class);
327+ if (method_exists ($ this , 'expectWarning ' )) {
328+ $ this ->expectWarning ();
329+ } else {
330+ $ this ->expectException (Warning::class);
331+ }
328332
329333 $ formatter ->format ($ value , NumberFormatter::TYPE_CURRENCY );
330334 }
@@ -699,7 +703,11 @@ public function parseProvider()
699703
700704 public function testParseTypeDefault ()
701705 {
702- $ this ->expectException (Warning::class);
706+ if (method_exists ($ this , 'expectWarning ' )) {
707+ $ this ->expectWarning ();
708+ } else {
709+ $ this ->expectException (Warning::class);
710+ }
703711
704712 $ formatter = $ this ->getNumberFormatter ('en ' , NumberFormatter::DECIMAL );
705713 $ formatter ->parse ('1 ' , NumberFormatter::TYPE_DEFAULT );
@@ -819,7 +827,11 @@ public function parseTypeDoubleProvider()
819827
820828 public function testParseTypeCurrency ()
821829 {
822- $ this ->expectException (Warning::class);
830+ if (method_exists ($ this , 'expectWarning ' )) {
831+ $ this ->expectWarning ();
832+ } else {
833+ $ this ->expectException (Warning::class);
834+ }
823835
824836 $ formatter = $ this ->getNumberFormatter ('en ' , NumberFormatter::DECIMAL );
825837 $ formatter ->parse ('1 ' , NumberFormatter::TYPE_CURRENCY );
0 commit comments