@@ -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 }
@@ -701,7 +705,11 @@ public function parseProvider()
701705
702706 public function testParseTypeDefault ()
703707 {
704- $ this ->expectException (Warning::class);
708+ if (method_exists ($ this , 'expectWarning ' )) {
709+ $ this ->expectWarning ();
710+ } else {
711+ $ this ->expectException (Warning::class);
712+ }
705713
706714 $ formatter = $ this ->getNumberFormatter ('en ' , NumberFormatter::DECIMAL );
707715 $ formatter ->parse ('1 ' , NumberFormatter::TYPE_DEFAULT );
@@ -821,7 +829,11 @@ public function parseTypeDoubleProvider()
821829
822830 public function testParseTypeCurrency ()
823831 {
824- $ this ->expectException (Warning::class);
832+ if (method_exists ($ this , 'expectWarning ' )) {
833+ $ this ->expectWarning ();
834+ } else {
835+ $ this ->expectException (Warning::class);
836+ }
825837
826838 $ formatter = $ this ->getNumberFormatter ('en ' , NumberFormatter::DECIMAL );
827839 $ formatter ->parse ('1 ' , NumberFormatter::TYPE_CURRENCY );
0 commit comments