diff options
author | Gustavo André dos Santos Lopes <cataphract@php.net> | 2012-05-31 13:02:02 +0200 |
---|---|---|
committer | Gustavo André dos Santos Lopes <cataphract@php.net> | 2012-06-04 22:25:08 +0200 |
commit | 036b1eb2912872ade10e35f26daf10c65cc3cdea (patch) | |
tree | c378f5cbaecbb1a2e4698ebc38249134e7b00573 /ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt | |
parent | f5b421621d89c3e87c498ee228c421e67719fbc6 (diff) | |
download | php-git-036b1eb2912872ade10e35f26daf10c65cc3cdea.tar.gz |
Tests for (RuleBased)BreakIterator.
Diffstat (limited to 'ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt')
-rw-r--r-- | ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt b/ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt new file mode 100644 index 0000000000..016db6441e --- /dev/null +++ b/ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt @@ -0,0 +1,47 @@ +--TEST-- +BreakIterator::following()/preceding()/isBoundary(): arg errors +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); + +$bi = new RuleBasedBreakiterator('[\p{Letter}\uFFFD]+;[:number:]+;'); +$bi->setText("\x80sdfé\x90d888 dfsa9"); + +var_dump($bi->following(1, 2)); +var_dump($bi->following(array())); +var_dump($bi->preceding(1, 2)); +var_dump($bi->preceding(array())); +var_dump($bi->isBoundary(1, 2)); +var_dump($bi->isBoundary(array())); + +--EXPECTF-- + +Warning: BreakIterator::following() expects exactly 1 parameter, 2 given in %s on line %d + +Warning: BreakIterator::following(): breakiter_following: bad arguments in %s on line %d +bool(false) + +Warning: BreakIterator::following() expects parameter 1 to be long, array given in %s on line %d + +Warning: BreakIterator::following(): breakiter_following: bad arguments in %s on line %d +bool(false) + +Warning: BreakIterator::preceding() expects exactly 1 parameter, 2 given in %s on line %d + +Warning: BreakIterator::preceding(): breakiter_preceding: bad arguments in %s on line %d +bool(false) + +Warning: BreakIterator::preceding() expects parameter 1 to be long, array given in %s on line %d + +Warning: BreakIterator::preceding(): breakiter_preceding: bad arguments in %s on line %d +bool(false) + +Warning: BreakIterator::isBoundary() expects exactly 1 parameter, 2 given in %s on line %d + +Warning: BreakIterator::isBoundary(): breakiter_is_boundary: bad arguments in %s on line %d +bool(false) + +Warning: BreakIterator::isBoundary() expects parameter 1 to be long, array given in %s on line %d + +Warning: BreakIterator::isBoundary(): breakiter_is_boundary: bad arguments in %s on line %d +bool(false) |