/** * Creates a new AlnumFilter object for each test method * * @return void */ public function setUp() { $this->filter = new AlnumFilter(); $this->locale = Locale::getDefault(); $language = Locale::getPrimaryLanguage($this->locale); self::$meansEnglishAlphabet = in_array($language, array('ja')); self::$unicodeEnabled = @preg_match('/\\pL/u', 'a') ? true : false; }
/** * Creates a new AlnumFilter object for each test method * * @return void */ public function setUp() { $this->_filter = new AlnumFilter(); if (null === self::$_unicodeEnabled) { self::$_unicodeEnabled = @preg_match('/\\pL/u', 'a') ? true : false; } if (null === self::$_meansEnglishAlphabet) { $this->_locale = new Locale('auto'); self::$_meansEnglishAlphabet = in_array($this->_locale->getLanguage(), array('ja')); } }