@@ -324,7 +324,11 @@ public function formatTypeDoubleWithCurrencyStyleProvider()
324
324
*/
325
325
public function testFormatTypeCurrency ($ formatter , $ value )
326
326
{
327
- $ this ->expectException (Warning::class);
327
+ if (method_exists ($ this , 'expectWarning ' )) {
328
+ $ this ->expectWarning ();
329
+ } else {
330
+ $ this ->expectException (Warning::class);
331
+ }
328
332
329
333
$ formatter ->format ($ value , NumberFormatter::TYPE_CURRENCY );
330
334
}
@@ -701,7 +705,11 @@ public function parseProvider()
701
705
702
706
public function testParseTypeDefault ()
703
707
{
704
- $ this ->expectException (Warning::class);
708
+ if (method_exists ($ this , 'expectWarning ' )) {
709
+ $ this ->expectWarning ();
710
+ } else {
711
+ $ this ->expectException (Warning::class);
712
+ }
705
713
706
714
$ formatter = $ this ->getNumberFormatter ('en ' , NumberFormatter::DECIMAL );
707
715
$ formatter ->parse ('1 ' , NumberFormatter::TYPE_DEFAULT );
@@ -821,7 +829,11 @@ public function parseTypeDoubleProvider()
821
829
822
830
public function testParseTypeCurrency ()
823
831
{
824
- $ this ->expectException (Warning::class);
832
+ if (method_exists ($ this , 'expectWarning ' )) {
833
+ $ this ->expectWarning ();
834
+ } else {
835
+ $ this ->expectException (Warning::class);
836
+ }
825
837
826
838
$ formatter = $ this ->getNumberFormatter ('en ' , NumberFormatter::DECIMAL );
827
839
$ formatter ->parse ('1 ' , NumberFormatter::TYPE_CURRENCY );
0 commit comments