rbbiter___construct_basic.phpt 564 B

12345678910111213141516171819202122232425262728293031
  1. --TEST--
  2. IntlRuleBasedBreakIterator::__construct: basic test
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded('intl'))
  6. die('skip intl extension not enabled');
  7. --FILE--
  8. <?php
  9. ini_set("intl.error_level", E_WARNING);
  10. ini_set("intl.default_locale", "pt_PT");
  11. $rules = <<<RULES
  12. \$LN = [[:letter:] [:number:]];
  13. \$S = [.;,:];
  14. !!forward;
  15. \$LN+ {1};
  16. \$S+ {42};
  17. !!reverse;
  18. \$LN+ {1};
  19. \$S+ {42};
  20. !!safe_forward;
  21. !!safe_reverse;
  22. RULES;
  23. $rbbi = new IntlRuleBasedBreakIterator($rules);
  24. var_dump(get_class($rbbi));
  25. ?>
  26. ==DONE==
  27. --EXPECT--
  28. string(26) "IntlRuleBasedBreakIterator"
  29. ==DONE==