php-src/ext/intl/tests/cpbi_getLastCodePoint_error.phpt
Gustavo André dos Santos Lopes 0a7ae87e91 Added IntlCodePointBreakIterator.
Objects of this class can be instantiated with

IntlBreakIterator::createCodePointInstance()

The method does not take a locale, as it would not make sense in this
context.

This class has one additional method:

long IntlCodePointIterator::getLastCodePoint()

which returns either -1 or the last code point we moved over, if any
(and discounting any movement before the last call to
IntlBreakIterator::first() or IntlBreakIterator::last()).
2012-06-22 18:19:54 +02:00

20 lines
548 B
PHP

--TEST--
IntlBreakIterator::getLastCodePoint(): bad args
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
$it = IntlBreakIterator::createCodePointInstance();
var_dump($it->getLastCodePoint(array()));
--EXPECTF--
Warning: IntlCodePointBreakIterator::getLastCodePoint() expects exactly 0 parameters, 1 given in %s on line %d
Warning: IntlCodePointBreakIterator::getLastCodePoint(): cpbi_get_last_code_point: bad arguments in %s on line %d
bool(false)