cpbi_clone_equality.phpt 617 B

123456789101112131415161718192021222324252627282930313233
  1. --TEST--
  2. IntlCodePointBreakIterator: clone and equality
  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. $text = 'ตัวอย่างข้อความ';
  12. $text2 = 'foo';
  13. $it = IntlBreakIterator::createCodePointInstance();
  14. $it->setText($text);
  15. $it_clone = clone $it;
  16. var_dump($it == $it_clone);
  17. $it->setText($text2 );
  18. var_dump($it == $it_clone);
  19. $it_clone->setText($text2);
  20. var_dump($it == $it_clone);
  21. ?>
  22. ==DONE==
  23. --EXPECT--
  24. bool(true)
  25. bool(false)
  26. bool(true)
  27. ==DONE==