cpbi_clone_equality.phpt 530 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. IntlCodePointBreakIterator: clone and equality
  3. --EXTENSIONS--
  4. intl
  5. --FILE--
  6. <?php
  7. ini_set("intl.error_level", E_WARNING);
  8. ini_set("intl.default_locale", "pt_PT");
  9. $text = 'ตัวอย่างข้อความ';
  10. $text2 = 'foo';
  11. $it = IntlBreakIterator::createCodePointInstance();
  12. $it->setText($text);
  13. $it_clone = clone $it;
  14. var_dump($it == $it_clone);
  15. $it->setText($text2 );
  16. var_dump($it == $it_clone);
  17. $it_clone->setText($text2);
  18. var_dump($it == $it_clone);
  19. ?>
  20. --EXPECT--
  21. bool(true)
  22. bool(false)
  23. bool(true)