Annotation of embedaddon/php/ext/intl/tests/spoofchecker_003.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: spoofchecker with locale settings
! 3: --SKIPIF--
! 4: <?php if(!extension_loaded('intl') || !class_exists("Spoofchecker")) print 'skip'; ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: $korean = "\xED\x95\x9C" . "\xEA\xB5\xAD" . "\xEB\xA7\x90";
! 9:
! 10: $x = new Spoofchecker();
! 11: echo "Is suspcious, en_US\n";
! 12:
! 13: $x->setAllowedLocales('en_US');
! 14: var_dump($x->isSuspicious($korean));
! 15:
! 16: echo "Is suspcious, ko_KR\n";
! 17:
! 18: $x->setAllowedLocales('en_US, ko_KR');
! 19: var_dump($x->isSuspicious($korean));
! 20: ?>
! 21: --EXPECTF--
! 22: Is suspcious, en_US
! 23: bool(true)
! 24: Is suspcious, ko_KR
! 25: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>