Exemplo n.º 1
0
 /**
  * Creates a new AlnumFilter object for each test method
  *
  * @return void
  */
 public function setUp()
 {
     $this->filter = new AlphaFilter();
     $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;
 }
Exemplo n.º 2
0
 /**
  * Creates a new AlphaFilter object for each test method
  *
  * @return void
  */
 public function setUp()
 {
     if (null === self::$_unicodeEnabled) {
         self::$_unicodeEnabled = @preg_match('/\\pL/u', 'a') ? true : false;
     }
     $this->_locale = new Locale('auto');
     if (null === self::$_meansEnglishAlphabet) {
         self::$_meansEnglishAlphabet = in_array($this->_locale->getLanguage(), array('ja'));
     }
     $this->_filter = new AlphaFilter(array('unicodeEnabled' => self::$_unicodeEnabled, 'locale' => $this->_locale));
 }