1--TEST-- 2Spoofchecker attempting to pass an unknown restriction level 3--EXTENSIONS-- 4intl 5--SKIPIF-- 6<?php 7if (!class_exists("Spoofchecker")) print 'skip'; 8 9if (!method_exists(new Spoofchecker(), 'setRestrictionLevel')) print 'skip ICU version < 58'; 10?> 11--FILE-- 12<?php 13 14$x = new Spoofchecker(); 15try { 16 $x->setRestrictionLevel(Spoofchecker::SINGLE_SCRIPT); 17} catch (\ValueError $e) { 18 echo $e->getMessage(), \PHP_EOL; 19} 20 21?> 22--EXPECT-- 23Spoofchecker::setRestrictionLevel(): Argument #1 ($level) must be one of Spoofchecker::ASCII, Spoofchecker::SINGLE_SCRIPT_RESTRICTIVE, Spoofchecker::SINGLE_HIGHLY_RESTRICTIVE, Spoofchecker::SINGLE_MODERATELY_RESTRICTIVE, Spoofchecker::SINGLE_MINIMALLY_RESTRICTIVE, or Spoofchecker::UNRESTRICTIVE 24