summaryrefslogtreecommitdiff
path: root/ext/intl/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/tests')
-rw-r--r--ext/intl/tests/breakiter_createCodePointInstance_error.phpt16
-rw-r--r--ext/intl/tests/breakiter_factories_error.phpt40
-rw-r--r--ext/intl/tests/breakiter_first_last_previous_current_error.phpt37
-rw-r--r--ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt49
-rw-r--r--ext/intl/tests/breakiter_getLocale_error.phpt31
-rw-r--r--ext/intl/tests/breakiter_getPartsIterator_error.phpt12
-rw-r--r--ext/intl/tests/breakiter_getText_error.phpt17
-rw-r--r--ext/intl/tests/breakiter_next_error.phpt25
-rw-r--r--ext/intl/tests/breakiter_setText_error.phpt42
-rw-r--r--ext/intl/tests/calendar_add_error.phpt25
-rw-r--r--ext/intl/tests/calendar_before_after_error.phpt29
-rw-r--r--ext/intl/tests/calendar_clear_error.phpt6
-rw-r--r--ext/intl/tests/calendar_createInstance_error.phpt18
-rw-r--r--ext/intl/tests/calendar_equals_error.phpt5
-rw-r--r--ext/intl/tests/calendar_fieldDifference_error.phpt29
-rw-r--r--ext/intl/tests/calendar_fromDateTime_error.phpt23
-rw-r--r--ext/intl/tests/calendar_getAvailableLocales_error.phpt22
-rw-r--r--ext/intl/tests/calendar_getDayOfWeekType_error.phpt18
-rw-r--r--ext/intl/tests/calendar_getErrorCode_error.phpt9
-rw-r--r--ext/intl/tests/calendar_getErrorMessage_error.phpt9
-rw-r--r--ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt15
-rw-r--r--ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt22
-rw-r--r--ext/intl/tests/calendar_getLocale_error.phpt25
-rw-r--r--ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt15
-rw-r--r--ext/intl/tests/calendar_getNow_error.phpt22
-rw-r--r--ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt28
-rw-r--r--ext/intl/tests/calendar_getTimeZone_error.phpt15
-rw-r--r--ext/intl/tests/calendar_getTime_error.phpt15
-rw-r--r--ext/intl/tests/calendar_getType_error.phpt15
-rw-r--r--ext/intl/tests/calendar_getWeekendTransition_error.phpt19
-rw-r--r--ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt25
-rw-r--r--ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt57
-rw-r--r--ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt30
-rw-r--r--ext/intl/tests/calendar_inDaylightTime_error.phpt15
-rw-r--r--ext/intl/tests/calendar_isEquivalentTo_error.phpt10
-rw-r--r--ext/intl/tests/calendar_isLenient_error.phpt15
-rw-r--r--ext/intl/tests/calendar_isSet_error.phpt18
-rw-r--r--ext/intl/tests/calendar_isWeekend_error.phpt21
-rw-r--r--ext/intl/tests/calendar_roll_error.phpt14
-rw-r--r--ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt12
-rw-r--r--ext/intl/tests/calendar_setLenient_error.phpt27
-rw-r--r--ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt12
-rw-r--r--ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt52
-rw-r--r--ext/intl/tests/calendar_setTimeZone_error.phpt15
-rw-r--r--ext/intl/tests/calendar_setTime_error.phpt21
-rw-r--r--ext/intl/tests/calendar_set_error.phpt10
-rw-r--r--ext/intl/tests/calendar_toDateTime_error.phpt15
-rw-r--r--ext/intl/tests/cpbi_getLastCodePoint_error.phpt17
-rw-r--r--ext/intl/tests/dateformat_formatObject_error.phpt12
-rw-r--r--ext/intl/tests/dateformat_getCalendarObject_error.phpt42
-rw-r--r--ext/intl/tests/dateformat_getTimeZone_error.phpt42
-rw-r--r--ext/intl/tests/dateformat_setTimeZone_error.phpt24
-rw-r--r--ext/intl/tests/formatter_fail.phpt54
-rw-r--r--ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt16
-rw-r--r--ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt34
-rw-r--r--ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt45
-rw-r--r--ext/intl/tests/idn_uts46_errors.phpt17
-rw-r--r--ext/intl/tests/intl_get_error_code.phpt2
-rw-r--r--ext/intl/tests/intl_get_error_message.phpt4
-rw-r--r--ext/intl/tests/locale_accept.phpt7
-rw-r--r--ext/intl/tests/msgfmt_fail2.phpt82
-rw-r--r--ext/intl/tests/timezone_countEquivalentIDs_error.phpt18
-rw-r--r--ext/intl/tests/timezone_createDefault_error.phpt16
-rw-r--r--ext/intl/tests/timezone_createEnumeration_error.phpt7
-rw-r--r--ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt24
-rw-r--r--ext/intl/tests/timezone_createTimeZone_error.phpt19
-rw-r--r--ext/intl/tests/timezone_fromDateTimeZone_error.phpt32
-rw-r--r--ext/intl/tests/timezone_getCanonicalID_error.phpt13
-rw-r--r--ext/intl/tests/timezone_getDSTSavings_error.phpt9
-rw-r--r--ext/intl/tests/timezone_getDisplayName_error.phpt24
-rw-r--r--ext/intl/tests/timezone_getEquivalentID_error.phpt19
-rw-r--r--ext/intl/tests/timezone_getErrorCode_error.phpt9
-rw-r--r--ext/intl/tests/timezone_getErrorMessage_error.phpt9
-rw-r--r--ext/intl/tests/timezone_getGMT_error.phpt16
-rw-r--r--ext/intl/tests/timezone_getID_error.phpt8
-rw-r--r--ext/intl/tests/timezone_getOffset_error.phpt13
-rw-r--r--ext/intl/tests/timezone_getRawOffset_error.phpt9
-rw-r--r--ext/intl/tests/timezone_getRegion_error.phpt19
-rw-r--r--ext/intl/tests/timezone_getTZDataVersion_error.phpt16
-rw-r--r--ext/intl/tests/timezone_getUnknown_error.phpt25
-rw-r--r--ext/intl/tests/timezone_toDateTimeZone_error.phpt12
-rw-r--r--ext/intl/tests/timezone_useDaylightTime_error.phpt8
-rw-r--r--ext/intl/tests/transliterator_create_from_rule_error.phpt16
-rw-r--r--ext/intl/tests/transliterator_create_inverse_error.phpt9
-rw-r--r--ext/intl/tests/transliterator_get_error_code_error.phpt14
-rw-r--r--ext/intl/tests/transliterator_get_error_message_error.phpt14
-rw-r--r--ext/intl/tests/transliterator_list_ids_error.phpt17
-rw-r--r--ext/intl/tests/transliterator_transliterate_error.phpt32
-rw-r--r--ext/intl/tests/uconverter_getAvailable_wrongparam_001.phpt8
89 files changed, 169 insertions, 1686 deletions
diff --git a/ext/intl/tests/breakiter_createCodePointInstance_error.phpt b/ext/intl/tests/breakiter_createCodePointInstance_error.phpt
deleted file mode 100644
index 13adc53b03..0000000000
--- a/ext/intl/tests/breakiter_createCodePointInstance_error.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-IntlBreakIterator::createCodePointInstance(): bad arguments
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(IntlBreakIterator::createCodePointInstance(array()));
---EXPECTF--
-Warning: IntlBreakIterator::createCodePointInstance() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlBreakIterator::createCodePointInstance(): breakiter_create_code_point_instance: bad arguments in %s on line %d
-NULL
diff --git a/ext/intl/tests/breakiter_factories_error.phpt b/ext/intl/tests/breakiter_factories_error.phpt
deleted file mode 100644
index 4f3a912a15..0000000000
--- a/ext/intl/tests/breakiter_factories_error.phpt
+++ /dev/null
@@ -1,40 +0,0 @@
---TEST--
-IntlBreakIterator factory methods: argument errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(IntlBreakIterator::createWordInstance(array()));
-var_dump(IntlBreakIterator::createSentenceInstance(NULL, 2));
-var_dump(IntlBreakIterator::createCharacterInstance(NULL, 2));
-var_dump(IntlBreakIterator::createTitleInstance(NULL, 2));
-var_dump(IntlBreakIterator::createLineInstance(NULL, 2));
---EXPECTF--
-Warning: IntlBreakIterator::createWordInstance() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: IntlBreakIterator::createWordInstance(): breakiter_create_word_instance: bad arguments in %s on line %d
-NULL
-
-Warning: IntlBreakIterator::createSentenceInstance() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::createSentenceInstance(): breakiter_create_sentence_instance: bad arguments in %s on line %d
-NULL
-
-Warning: IntlBreakIterator::createCharacterInstance() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::createCharacterInstance(): breakiter_create_character_instance: bad arguments in %s on line %d
-NULL
-
-Warning: IntlBreakIterator::createTitleInstance() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::createTitleInstance(): breakiter_create_title_instance: bad arguments in %s on line %d
-NULL
-
-Warning: IntlBreakIterator::createLineInstance() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::createLineInstance(): breakiter_create_line_instance: bad arguments in %s on line %d
-NULL
diff --git a/ext/intl/tests/breakiter_first_last_previous_current_error.phpt b/ext/intl/tests/breakiter_first_last_previous_current_error.phpt
deleted file mode 100644
index da37ffea78..0000000000
--- a/ext/intl/tests/breakiter_first_last_previous_current_error.phpt
+++ /dev/null
@@ -1,37 +0,0 @@
---TEST--
-IntlBreakIterator::first()/last()/previous()/current(): arg errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$bi = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;');
-$bi->setText("\x80sdfé\x90d888 dfsa9");
-
-var_dump($bi->first(1));
-var_dump($bi->last(1));
-var_dump($bi->previous(1));
-var_dump($bi->current(1));
---EXPECTF--
-Warning: IntlBreakIterator::first() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlBreakIterator::first(): breakiter_first: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::last() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlBreakIterator::last(): breakiter_last: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::previous() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlBreakIterator::previous(): breakiter_previous: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::current() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlBreakIterator::current(): breakiter_current: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt b/ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt
deleted file mode 100644
index 56ed60ffcf..0000000000
--- a/ext/intl/tests/breakiter_following_preceding_isBoundary_error.phpt
+++ /dev/null
@@ -1,49 +0,0 @@
---TEST--
-IntlBreakIterator::following()/preceding()/isBoundary(): arg errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$bi = new IntlRuleBasedBreakIterator('[\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: IntlBreakIterator::following() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::following(): breakiter_following: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::following() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlBreakIterator::following(): breakiter_following: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::preceding() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::preceding(): breakiter_preceding: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::preceding() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlBreakIterator::preceding(): breakiter_preceding: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::isBoundary() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::isBoundary(): breakiter_is_boundary: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::isBoundary() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlBreakIterator::isBoundary(): breakiter_is_boundary: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/breakiter_getLocale_error.phpt b/ext/intl/tests/breakiter_getLocale_error.phpt
deleted file mode 100644
index f318743948..0000000000
--- a/ext/intl/tests/breakiter_getLocale_error.phpt
+++ /dev/null
@@ -1,31 +0,0 @@
---TEST--
-IntlBreakIterator::getLocale(): arg errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$bi = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;');
-$bi->setText("\x80sdfé\x90d888 dfsa9");
-
-var_dump($bi->getLocale(1, 2));
-var_dump($bi->getLocale(array()));
-var_dump($bi->getLocale());
---EXPECTF--
-Warning: IntlBreakIterator::getLocale() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::getLocale(): breakiter_get_locale: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::getLocale() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlBreakIterator::getLocale(): breakiter_get_locale: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::getLocale() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlBreakIterator::getLocale(): breakiter_get_locale: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/breakiter_getPartsIterator_error.phpt b/ext/intl/tests/breakiter_getPartsIterator_error.phpt
index b756540578..506b376c19 100644
--- a/ext/intl/tests/breakiter_getPartsIterator_error.phpt
+++ b/ext/intl/tests/breakiter_getPartsIterator_error.phpt
@@ -10,23 +10,11 @@ ini_set("intl.error_level", E_WARNING);
ini_set("intl.default_locale", "pt_PT");
$it = IntlBreakIterator::createWordInstance(NULL);
-var_dump($it->getPartsIterator(array()));
-var_dump($it->getPartsIterator(1, 2));
var_dump($it->getPartsIterator(-1));
?>
==DONE==
--EXPECTF--
-Warning: IntlBreakIterator::getPartsIterator() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlBreakIterator::getPartsIterator(): breakiter_get_parts_iterator: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::getPartsIterator() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::getPartsIterator(): breakiter_get_parts_iterator: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlBreakIterator::getPartsIterator(): breakiter_get_parts_iterator: bad key type in %s on line %d
bool(false)
==DONE==
diff --git a/ext/intl/tests/breakiter_getText_error.phpt b/ext/intl/tests/breakiter_getText_error.phpt
deleted file mode 100644
index d66b4bb69f..0000000000
--- a/ext/intl/tests/breakiter_getText_error.phpt
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--
-IntlBreakIterator::getText(): arg errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$bi = new IntlRuleBasedBreakIterator('[\p{Letter}]+;');
-var_dump($bi->getText(array()));
---EXPECTF--
-Warning: IntlBreakIterator::getText() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlBreakIterator::getText(): breakiter_get_text: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/breakiter_next_error.phpt b/ext/intl/tests/breakiter_next_error.phpt
deleted file mode 100644
index eb4664308c..0000000000
--- a/ext/intl/tests/breakiter_next_error.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-IntlBreakIterator::next(): arg errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$bi = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+;');
-$bi->setText("\x80sdfé\x90d888 dfsa9");
-
-var_dump($bi->next(1, 2));
-var_dump($bi->next(array()));
---EXPECTF--
-Warning: IntlBreakIterator::next() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::next(): breakiter_next: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::next() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlBreakIterator::next(): breakiter_next: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/breakiter_setText_error.phpt b/ext/intl/tests/breakiter_setText_error.phpt
deleted file mode 100644
index c94a8433f1..0000000000
--- a/ext/intl/tests/breakiter_setText_error.phpt
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-IntlBreakIterator::setText(): arg errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$bi = new IntlRuleBasedBreakIterator('[\p{Letter}]+;');
-var_dump($bi->setText());
-var_dump($bi->setText(array()));
-var_dump($bi->setText(1,2));
-
-class A {
-function __destruct() { var_dump('destructed'); throw new Exception('e'); }
-function __tostring() { return 'foo'; }
-}
-
-try {
-var_dump($bi->setText(new A));
-} catch (Exception $e) {
-var_dump($e->getMessage());
-}
---EXPECTF--
-Warning: IntlBreakIterator::setText() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlBreakIterator::setText(): breakiter_set_text: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::setText() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: IntlBreakIterator::setText(): breakiter_set_text: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlBreakIterator::setText() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlBreakIterator::setText(): breakiter_set_text: bad arguments in %s on line %d
-bool(false)
-string(10) "destructed"
-string(1) "e"
diff --git a/ext/intl/tests/calendar_add_error.phpt b/ext/intl/tests/calendar_add_error.phpt
index 017551821d..1fc12828e1 100644
--- a/ext/intl/tests/calendar_add_error.phpt
+++ b/ext/intl/tests/calendar_add_error.phpt
@@ -10,33 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->add(1, 2, 3));
-var_dump($c->add(-1, 2));
-var_dump($c->add(1));
-
-var_dump(intlcal_add($c, 1, 2, 3));
var_dump(intlcal_add(1, 2, 3));
--EXPECTF--
-Warning: IntlCalendar::add() expects exactly 2 parameters, 3 given in %s on line %d
-
-Warning: IntlCalendar::add(): intlcal_add: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::add(): intlcal_add: invalid field in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::add() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::add(): intlcal_add: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_add() expects exactly 3 parameters, 4 given in %s on line %d
-
-Warning: intlcal_add(): intlcal_add: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_add() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_add(1, 2, 3)
diff --git a/ext/intl/tests/calendar_before_after_error.phpt b/ext/intl/tests/calendar_before_after_error.phpt
index 279e3d816e..805f064841 100644
--- a/ext/intl/tests/calendar_before_after_error.phpt
+++ b/ext/intl/tests/calendar_before_after_error.phpt
@@ -61,25 +61,18 @@ try {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
--EXPECT--
-error: 2, IntlCalendar::after() expects exactly 1 parameter, 0 given
-error: 2, IntlCalendar::after(): intlcal_before/after: bad arguments
-bool(false)
-error: 2, IntlCalendar::before() expects exactly 1 parameter, 0 given
-error: 2, IntlCalendar::before(): intlcal_before/after: bad arguments
-bool(false)
+error: 0, IntlCalendar::after() expects exactly 1 parameter, 0 given
+
+error: 0, IntlCalendar::before() expects exactly 1 parameter, 0 given
+
error: 0, Argument 1 passed to IntlCalendar::after() must be an instance of IntlCalendar, int given
error: 0, Argument 1 passed to IntlCalendar::before() must be an instance of IntlCalendar, int given
-error: 2, IntlCalendar::after() expects exactly 1 parameter, 2 given
-error: 2, IntlCalendar::after(): intlcal_before/after: bad arguments
-bool(false)
-error: 2, IntlCalendar::before() expects exactly 1 parameter, 2 given
-error: 2, IntlCalendar::before(): intlcal_before/after: bad arguments
-bool(false)
-error: 2, intlcal_after() expects exactly 2 parameters, 1 given
-error: 2, intlcal_after(): intlcal_before/after: bad arguments
-bool(false)
-error: 2, intlcal_before() expects exactly 2 parameters, 1 given
-error: 2, intlcal_before(): intlcal_before/after: bad arguments
-bool(false)
+error: 0, IntlCalendar::after() expects exactly 1 parameter, 2 given
+
+error: 0, IntlCalendar::before() expects exactly 1 parameter, 2 given
+
+error: 0, intlcal_after() expects exactly 2 parameters, 1 given
+
+error: 0, intlcal_before() expects exactly 2 parameters, 1 given
diff --git a/ext/intl/tests/calendar_clear_error.phpt b/ext/intl/tests/calendar_clear_error.phpt
index bffa103eac..e91b7a6326 100644
--- a/ext/intl/tests/calendar_clear_error.phpt
+++ b/ext/intl/tests/calendar_clear_error.phpt
@@ -12,17 +12,11 @@ ini_set("intl.error_level", E_WARNING);
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->clear(1, 2));
var_dump($c->clear(-1));
var_dump(intlcal_clear($c, -1));
var_dump(intlcal_clear(1, 2));
--EXPECTF--
-Warning: IntlCalendar::clear() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::clear(): intlcal_clear: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlCalendar::clear(): intlcal_clear: invalid field in %s on line %d
bool(false)
diff --git a/ext/intl/tests/calendar_createInstance_error.phpt b/ext/intl/tests/calendar_createInstance_error.phpt
index 5cb9fa1c63..516cc9260e 100644
--- a/ext/intl/tests/calendar_createInstance_error.phpt
+++ b/ext/intl/tests/calendar_createInstance_error.phpt
@@ -12,25 +12,7 @@ class X extends IntlTimeZone {
function __construct() {}
}
-var_dump(IntlCalendar::createInstance(1, 2, 3));
-var_dump(intlcal_create_instance(1, 2, 3));
var_dump(intlcal_create_instance(new X, NULL));
-var_dump(intlcal_create_instance(NULL, array()));
--EXPECTF--
-Warning: IntlCalendar::createInstance() expects at most 2 parameters, 3 given in %s on line %d
-
-Warning: IntlCalendar::createInstance(): intlcal_create_calendar: bad arguments in %s on line %d
-NULL
-
-Warning: intlcal_create_instance() expects at most 2 parameters, 3 given in %s on line %d
-
-Warning: intlcal_create_instance(): intlcal_create_calendar: bad arguments in %s on line %d
-NULL
-
Warning: intlcal_create_instance(): intlcal_create_instance: passed IntlTimeZone is not properly constructed in %s on line %d
NULL
-
-Warning: intlcal_create_instance() expects parameter 2 to be string, array given in %s on line %d
-
-Warning: intlcal_create_instance(): intlcal_create_calendar: bad arguments in %s on line %d
-NULL
diff --git a/ext/intl/tests/calendar_equals_error.phpt b/ext/intl/tests/calendar_equals_error.phpt
index 4c585a6018..d716c1a698 100644
--- a/ext/intl/tests/calendar_equals_error.phpt
+++ b/ext/intl/tests/calendar_equals_error.phpt
@@ -45,9 +45,8 @@ try {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
--EXPECT--
-error: 2, IntlCalendar::equals() expects exactly 1 parameter, 0 given
-error: 2, IntlCalendar::equals(): intlcal_equals: bad arguments
-bool(false)
+error: 0, IntlCalendar::equals() expects exactly 1 parameter, 0 given
+
error: 0, Argument 1 passed to IntlCalendar::equals() must be an instance of IntlCalendar, instance of stdClass given
error: 0, Argument 1 passed to IntlCalendar::equals() must be an instance of IntlCalendar, int given
diff --git a/ext/intl/tests/calendar_fieldDifference_error.phpt b/ext/intl/tests/calendar_fieldDifference_error.phpt
index 4f3fc351cb..fa88605348 100644
--- a/ext/intl/tests/calendar_fieldDifference_error.phpt
+++ b/ext/intl/tests/calendar_fieldDifference_error.phpt
@@ -12,30 +12,25 @@ ini_set("intl.error_level", E_WARNING);
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->fieldDifference($c, 2, 3));
+try {
+ var_dump($c->fieldDifference($c, 2, 3));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
var_dump($c->fieldDifference(INF, 2));
-var_dump($c->fieldDifference(1));
-var_dump(intlcal_field_difference($c, 0, 1, 2));
+try {
+ var_dump(intlcal_field_difference($c, 0, 1, 2));
+} catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+}
var_dump(intlcal_field_difference(1, 0, 1));
--EXPECTF--
-Warning: IntlCalendar::fieldDifference() expects exactly 2 parameters, 3 given in %s on line %d
-
-Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: bad arguments in %s on line %d
-bool(false)
+IntlCalendar::fieldDifference() expects exactly 2 parameters, 3 given
Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: Call to ICU method has failed in %s on line %d
bool(false)
-
-Warning: IntlCalendar::fieldDifference() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::fieldDifference(): intlcal_field_difference: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_field_difference() expects exactly 3 parameters, 4 given in %s on line %d
-
-Warning: intlcal_field_difference(): intlcal_field_difference: bad arguments in %s on line %d
-bool(false)
+intlcal_field_difference() expects exactly 3 parameters, 4 given
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_field_difference() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
diff --git a/ext/intl/tests/calendar_fromDateTime_error.phpt b/ext/intl/tests/calendar_fromDateTime_error.phpt
index 1074159687..6fbaeb57f8 100644
--- a/ext/intl/tests/calendar_fromDateTime_error.phpt
+++ b/ext/intl/tests/calendar_fromDateTime_error.phpt
@@ -10,13 +10,10 @@ ini_set("intl.error_level", E_WARNING);
ini_set("intl.default_locale", "nl");
date_default_timezone_set('Europe/Lisbon');
-var_dump(IntlCalendar::fromDateTime());
-var_dump(IntlCalendar::fromDateTime(0,1,2));
-
try {
-IntlCalendar::fromDateTime("foobar");
+ IntlCalendar::fromDateTime("foobar");
} catch (Exception $e) {
- echo "threw exception, OK";
+ echo "threw exception, OK";
}
class A extends DateTime {
function __construct() {}
@@ -29,18 +26,7 @@ var_dump(IntlCalendar::fromDateTime($date));
$date = new DateTime('2012-01-01 00:00:00 WEST');
var_dump(IntlCalendar::fromDateTime($date));
-
-var_dump(intlcal_from_date_time());
--EXPECTF--
-Warning: IntlCalendar::fromDateTime() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::fromDateTime(): intlcal_from_date_time: bad arguments in %s on line %d
-NULL
-
-Warning: IntlCalendar::fromDateTime() expects at most 2 parameters, 3 given in %s on line %d
-
-Warning: IntlCalendar::fromDateTime(): intlcal_from_date_time: bad arguments in %s on line %d
-NULL
threw exception, OK
Warning: IntlCalendar::fromDateTime(): intlcal_from_date_time: DateTime object is unconstructed in %s on line %d
NULL
@@ -50,8 +36,3 @@ NULL
Warning: IntlCalendar::fromDateTime(): intlcal_from_date_time: time zone id 'WEST' extracted from ext/date DateTimeZone not recognized in %s on line %d
NULL
-
-Warning: intlcal_from_date_time() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: intlcal_from_date_time(): intlcal_from_date_time: bad arguments in %s on line %d
-NULL
diff --git a/ext/intl/tests/calendar_getAvailableLocales_error.phpt b/ext/intl/tests/calendar_getAvailableLocales_error.phpt
deleted file mode 100644
index 3aee500fea..0000000000
--- a/ext/intl/tests/calendar_getAvailableLocales_error.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-IntlCalendar::getAvailableLocales(): bad arguments
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(intlcal_get_available_locales(1));
-var_dump(IntlCalendar::getAvailableLocales(2));
---EXPECTF--
-Warning: intlcal_get_available_locales() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: intlcal_get_available_locales(): intlcal_get_available_locales: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getAvailableLocales() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getAvailableLocales(): intlcal_get_available_locales: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt
index 46fe17d9cd..2722f54052 100644
--- a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt
+++ b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt
@@ -12,31 +12,13 @@ ini_set("intl.error_level", E_WARNING);
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->getDayOfWeekType(1, 2));
var_dump($c->getDayOfWeekType(0));
-var_dump($c->getDayOfWeekType());
-var_dump(intlcal_get_day_of_week_type($c, "foo"));
var_dump(intlcal_get_day_of_week_type(1, 1));
--EXPECTF--
-Warning: IntlCalendar::getDayOfWeekType() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::getDayOfWeekType(): intlcal_get_day_of_week_type: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlCalendar::getDayOfWeekType(): intlcal_get_day_of_week_type: invalid day of week in %s on line %d
bool(false)
-Warning: IntlCalendar::getDayOfWeekType() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getDayOfWeekType(): intlcal_get_day_of_week_type: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_day_of_week_type() expects parameter 2 to be int, string given in %s on line %d
-
-Warning: intlcal_get_day_of_week_type(): intlcal_get_day_of_week_type: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_day_of_week_type() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_day_of_week_type(1, 1)
diff --git a/ext/intl/tests/calendar_getErrorCode_error.phpt b/ext/intl/tests/calendar_getErrorCode_error.phpt
index fd999fbbbf..56e748fa12 100644
--- a/ext/intl/tests/calendar_getErrorCode_error.phpt
+++ b/ext/intl/tests/calendar_getErrorCode_error.phpt
@@ -10,17 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getErrorCode(array()));
-
var_dump(intlcal_get_error_code(null));
--EXPECTF--
-Warning: IntlCalendar::getErrorCode() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getErrorCode(): intlcal_get_error_code: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_error_code() must be an instance of IntlCalendar, null given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_error_code(NULL)
diff --git a/ext/intl/tests/calendar_getErrorMessage_error.phpt b/ext/intl/tests/calendar_getErrorMessage_error.phpt
index cc52449d94..8cdbb1f34b 100644
--- a/ext/intl/tests/calendar_getErrorMessage_error.phpt
+++ b/ext/intl/tests/calendar_getErrorMessage_error.phpt
@@ -10,17 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getErrorMessage(array()));
-
var_dump(intlcal_get_error_message(null));
--EXPECTF--
-Warning: IntlCalendar::getErrorMessage() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getErrorMessage(): intlcal_get_error_message: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_error_message() must be an instance of IntlCalendar, null given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_error_message(NULL)
diff --git a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt
index ca2dc4a9f2..68e0fd9074 100644
--- a/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt
+++ b/ext/intl/tests/calendar_getFirstDayOfWeek_error.phpt
@@ -10,23 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getFirstDayOfWeek(1));
-
-var_dump(intlcal_get_first_day_of_week($c, 1));
var_dump(intlcal_get_first_day_of_week(1));
--EXPECTF--
-Warning: IntlCalendar::getFirstDayOfWeek() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getFirstDayOfWeek(): intlcal_get_first_day_of_week: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_first_day_of_week() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_get_first_day_of_week(): intlcal_get_first_day_of_week: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_first_day_of_week() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_first_day_of_week(1)
diff --git a/ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt b/ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt
deleted file mode 100644
index 717c435be7..0000000000
--- a/ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-IntlCalendar::getKeywordValuesForLocale(): bad arguments
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(intlcal_get_keyword_values_for_locale(1, 2));
-var_dump(IntlCalendar::getKeywordValuesForLocale(1, 2, array()));
---EXPECTF--
-Warning: intlcal_get_keyword_values_for_locale() expects exactly 3 parameters, 2 given in %s on line %d
-
-Warning: intlcal_get_keyword_values_for_locale(): intlcal_get_keyword_values_for_locale: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getKeywordValuesForLocale() expects parameter 3 to be bool, array given in %s on line %d
-
-Warning: IntlCalendar::getKeywordValuesForLocale(): intlcal_get_keyword_values_for_locale: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/calendar_getLocale_error.phpt b/ext/intl/tests/calendar_getLocale_error.phpt
index 008e1b756e..c033d82cf3 100644
--- a/ext/intl/tests/calendar_getLocale_error.phpt
+++ b/ext/intl/tests/calendar_getLocale_error.phpt
@@ -10,33 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getLocale());
-var_dump($c->getLocale(2));
-var_dump($c->getLocale(2, 3));
-
-var_dump(intlcal_get_locale($c));
var_dump(intlcal_get_locale(1));
--EXPECTF--
-Warning: IntlCalendar::getLocale() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getLocale(): intlcal_get_locale: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getLocale(): intlcal_get_locale: invalid locale type in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getLocale() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::getLocale(): intlcal_get_locale: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_locale() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: intlcal_get_locale(): intlcal_get_locale: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_locale() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_locale(1)
diff --git a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt
index a1190e5ce0..fe3825ad68 100644
--- a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt
+++ b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_error.phpt
@@ -10,23 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getMinimalDaysInFirstWeek(1));
-
-var_dump(intlcal_get_minimal_days_in_first_week($c, 1));
var_dump(intlcal_get_minimal_days_in_first_week(1));
--EXPECTF--
-Warning: IntlCalendar::getMinimalDaysInFirstWeek() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getMinimalDaysInFirstWeek(): intlcal_get_minimal_days_in_first_week: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_minimal_days_in_first_week() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_get_minimal_days_in_first_week(): intlcal_get_minimal_days_in_first_week: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_minimal_days_in_first_week() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_minimal_days_in_first_week(1)
diff --git a/ext/intl/tests/calendar_getNow_error.phpt b/ext/intl/tests/calendar_getNow_error.phpt
deleted file mode 100644
index 712e210851..0000000000
--- a/ext/intl/tests/calendar_getNow_error.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-IntlCalendar::getNow(): bad arguments
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(intlcal_get_now(1));
-var_dump(IntlCalendar::getNow(2));
---EXPECTF--
-Warning: intlcal_get_now() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: intlcal_get_now(): intlcal_get_now: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getNow() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getNow(): intlcal_get_now: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
index 06aa679c5a..57eca0996e 100644
--- a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
+++ b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
@@ -10,36 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getSkippedWallTimeOption(1));
-var_dump($c->getRepeatedWallTimeOption(1));
-
-var_dump(intlcal_get_skipped_wall_time_option($c, 1));
-var_dump(intlcal_get_repeated_wall_time_option($c, 1));
-
var_dump(intlcal_get_skipped_wall_time_option(1));
--EXPECTF--
-Warning: IntlCalendar::getSkippedWallTimeOption() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getSkippedWallTimeOption(): intlcal_get_skipped_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getRepeatedWallTimeOption() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getRepeatedWallTimeOption(): intlcal_get_repeated_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_skipped_wall_time_option() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_get_skipped_wall_time_option(): intlcal_get_skipped_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_repeated_wall_time_option() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_get_repeated_wall_time_option(): intlcal_get_repeated_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_skipped_wall_time_option() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_skipped_wall_time_option(1)
diff --git a/ext/intl/tests/calendar_getTimeZone_error.phpt b/ext/intl/tests/calendar_getTimeZone_error.phpt
index ea7e85db4c..f78d93f454 100644
--- a/ext/intl/tests/calendar_getTimeZone_error.phpt
+++ b/ext/intl/tests/calendar_getTimeZone_error.phpt
@@ -10,23 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getTimeZone(1));
-
-var_dump(intlcal_get_time_zone($c, 1));
var_dump(intlcal_get_time_zone(1));
--EXPECTF--
-Warning: IntlCalendar::getTimeZone() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getTimeZone(): intlcal_get_time_zone: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_time_zone() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_get_time_zone(): intlcal_get_time_zone: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_time_zone() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_time_zone(1)
diff --git a/ext/intl/tests/calendar_getTime_error.phpt b/ext/intl/tests/calendar_getTime_error.phpt
index 61eaea97dc..51cb0cfe7e 100644
--- a/ext/intl/tests/calendar_getTime_error.phpt
+++ b/ext/intl/tests/calendar_getTime_error.phpt
@@ -10,23 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getTime(1));
-
-var_dump(intlcal_get_time($c, 1));
var_dump(intlcal_get_time(1));
--EXPECTF--
-Warning: IntlCalendar::getTime() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getTime(): intlcal_get_time: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_time() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_get_time(): intlcal_get_time: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_time() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_time(1)
diff --git a/ext/intl/tests/calendar_getType_error.phpt b/ext/intl/tests/calendar_getType_error.phpt
index c124151893..abc5f17fdd 100644
--- a/ext/intl/tests/calendar_getType_error.phpt
+++ b/ext/intl/tests/calendar_getType_error.phpt
@@ -10,23 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getType(1));
-
-var_dump(intlcal_get_type($c, 1));
var_dump(intlcal_get_type(1));
--EXPECTF--
-Warning: IntlCalendar::getType() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::getType(): intlcal_get_type: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_get_type() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_get_type(): intlcal_get_type: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_type() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_type(1)
diff --git a/ext/intl/tests/calendar_getWeekendTransition_error.phpt b/ext/intl/tests/calendar_getWeekendTransition_error.phpt
index d61c9d5a25..f6a4a71c18 100644
--- a/ext/intl/tests/calendar_getWeekendTransition_error.phpt
+++ b/ext/intl/tests/calendar_getWeekendTransition_error.phpt
@@ -11,32 +11,13 @@ if (!extension_loaded('intl'))
ini_set("intl.error_level", E_WARNING);
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->getWeekendTransition());
-var_dump($c->getWeekendTransition(1, 2));
var_dump($c->getWeekendTransition(0));
-var_dump(intlcal_get_weekend_transition($c));
var_dump(intlcal_get_weekend_transition(1, 1));
--EXPECTF--
-Warning: IntlCalendar::getWeekendTransition() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getWeekendTransition() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlCalendar::getWeekendTransition(): intlcal_get_weekend_transition: invalid day of week in %s on line %d
bool(false)
-Warning: intlcal_get_weekend_transition() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: intlcal_get_weekend_transition(): intlcal_get_weekend_transition: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_weekend_transition() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_get_weekend_transition(1, 1)
diff --git a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
index 6c6f67f953..9612862119 100644
--- a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
+++ b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
@@ -12,11 +12,6 @@ ini_set("intl.error_level", E_WARNING);
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->getLeastMaximum());
-var_dump($c->getMaximum());
-var_dump($c->getGreatestMinimum());
-var_dump($c->getMinimum());
-
var_dump($c->getLeastMaximum(-1));
var_dump($c->getMaximum(-1));
var_dump($c->getGreatestMinimum(-1));
@@ -53,26 +48,6 @@ try {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
--EXPECTF--
-Warning: IntlCalendar::getLeastMaximum() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getLeastMaximum(): intlcal_get_least_maximum: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getMaximum() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getMaximum(): intlcal_get_maximum: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getGreatestMinimum() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getGreatestMinimum(): intlcal_get_greatest_minimum: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getMinimum() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getMinimum(): intlcal_get_minimum: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlCalendar::getLeastMaximum(): intlcal_get_least_maximum: invalid field in %s on line %d
bool(false)
diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt
index d7d20ed6cd..3853d612a3 100644
--- a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt
+++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error.phpt
@@ -12,37 +12,12 @@ ini_set("intl.error_level", E_WARNING);
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->get());
-var_dump($c->getActualMaximum());
-var_dump($c->getActualMinimum());
-
var_dump($c->get(-1));
var_dump($c->getActualMaximum(-1));
var_dump($c->getActualMinimum(-1));
-var_dump($c->get("s"));
-var_dump($c->getActualMaximum("s"));
-var_dump($c->getActualMinimum("s"));
-
-var_dump($c->get(1, 2));
-var_dump($c->getActualMaximum(1, 2));
-var_dump($c->getActualMinimum(1, 2));
+?>
--EXPECTF--
-Warning: IntlCalendar::get() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::get(): intlcal_get: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getActualMaximum() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getActualMaximum(): intlcal_get_actual_maximum: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getActualMinimum() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::getActualMinimum(): intlcal_get_actual_minimum: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlCalendar::get(): intlcal_get: invalid field in %s on line %d
bool(false)
@@ -51,33 +26,3 @@ bool(false)
Warning: IntlCalendar::getActualMinimum(): intlcal_get_actual_minimum: invalid field in %s on line %d
bool(false)
-
-Warning: IntlCalendar::get() expects parameter 1 to be int, string given in %s on line %d
-
-Warning: IntlCalendar::get(): intlcal_get: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getActualMaximum() expects parameter 1 to be int, string given in %s on line %d
-
-Warning: IntlCalendar::getActualMaximum(): intlcal_get_actual_maximum: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getActualMinimum() expects parameter 1 to be int, string given in %s on line %d
-
-Warning: IntlCalendar::getActualMinimum(): intlcal_get_actual_minimum: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::get() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::get(): intlcal_get: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getActualMaximum() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::getActualMaximum(): intlcal_get_actual_maximum: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::getActualMinimum() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::getActualMinimum(): intlcal_get_actual_minimum: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
index 37e3816fef..98408a4327 100644
--- a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
+++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
@@ -81,30 +81,24 @@ try {
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
--EXPECT--
-error: 2, intlcal_get() expects exactly 2 parameters, 1 given
-error: 2, intlcal_get(): intlcal_get: bad arguments
-bool(false)
-error: 2, intlcal_get_actual_maximum() expects exactly 2 parameters, 1 given
-error: 2, intlcal_get_actual_maximum(): intlcal_get_actual_maximum: bad arguments
-bool(false)
-error: 2, intlcal_get_actual_minimum() expects exactly 2 parameters, 1 given
-error: 2, intlcal_get_actual_minimum(): intlcal_get_actual_minimum: bad arguments
-bool(false)
+error: 0, intlcal_get() expects exactly 2 parameters, 1 given
+
+error: 0, intlcal_get_actual_maximum() expects exactly 2 parameters, 1 given
+
+error: 0, intlcal_get_actual_minimum() expects exactly 2 parameters, 1 given
+
error: 2, intlcal_get(): intlcal_get: invalid field
bool(false)
error: 2, intlcal_get_actual_maximum(): intlcal_get_actual_maximum: invalid field
bool(false)
error: 2, intlcal_get_actual_minimum(): intlcal_get_actual_minimum: invalid field
bool(false)
-error: 2, intlcal_get() expects parameter 2 to be int, string given
-error: 2, intlcal_get(): intlcal_get: bad arguments
-bool(false)
-error: 2, intlcal_get_actual_maximum() expects parameter 2 to be int, string given
-error: 2, intlcal_get_actual_maximum(): intlcal_get_actual_maximum: bad arguments
-bool(false)
-error: 2, intlcal_get_actual_minimum() expects parameter 2 to be int, string given
-error: 2, intlcal_get_actual_minimum(): intlcal_get_actual_minimum: bad arguments
-bool(false)
+error: 0, intlcal_get() expects parameter 2 to be int, string given
+
+error: 0, intlcal_get_actual_maximum() expects parameter 2 to be int, string given
+
+error: 0, intlcal_get_actual_minimum() expects parameter 2 to be int, string given
+
error: 0, Argument 1 passed to intlcal_get() must be an instance of IntlCalendar, int given
error: 0, Argument 1 passed to intlcal_get_actual_maximum() must be an instance of IntlCalendar, int given
diff --git a/ext/intl/tests/calendar_inDaylightTime_error.phpt b/ext/intl/tests/calendar_inDaylightTime_error.phpt
index 6644f477ea..bbcfcaabb1 100644
--- a/ext/intl/tests/calendar_inDaylightTime_error.phpt
+++ b/ext/intl/tests/calendar_inDaylightTime_error.phpt
@@ -10,23 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->inDaylightTime(1));
-
-var_dump(intlcal_in_daylight_time($c, 1));
var_dump(intlcal_in_daylight_time(1));
--EXPECTF--
-Warning: IntlCalendar::inDaylightTime() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::inDaylightTime(): intlcal_in_daylight_time: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_in_daylight_time() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_in_daylight_time(): intlcal_in_daylight_time: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_in_daylight_time() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_in_daylight_time(1)
diff --git a/ext/intl/tests/calendar_isEquivalentTo_error.phpt b/ext/intl/tests/calendar_isEquivalentTo_error.phpt
index c7e30fd645..254d1dab84 100644
--- a/ext/intl/tests/calendar_isEquivalentTo_error.phpt
+++ b/ext/intl/tests/calendar_isEquivalentTo_error.phpt
@@ -51,14 +51,12 @@ try {
--EXPECT--
error: 0, Argument 1 passed to IntlCalendar::isEquivalentTo() must be an instance of IntlCalendar, int given
-error: 2, IntlCalendar::isEquivalentTo() expects exactly 1 parameter, 2 given
-error: 2, IntlCalendar::isEquivalentTo(): intlcal_is_equivalent_to: bad arguments
-bool(false)
+error: 0, IntlCalendar::isEquivalentTo() expects exactly 1 parameter, 2 given
+
error: 0, Argument 1 passed to IntlCalendar::isEquivalentTo() must be an instance of IntlCalendar, int given
-error: 2, intlcal_is_equivalent_to() expects exactly 2 parameters, 1 given
-error: 2, intlcal_is_equivalent_to(): intlcal_is_equivalent_to: bad arguments
-bool(false)
+error: 0, intlcal_is_equivalent_to() expects exactly 2 parameters, 1 given
+
error: 0, Argument 2 passed to intlcal_is_equivalent_to() must be an instance of IntlCalendar, int given
error: 0, Argument 1 passed to intlcal_is_equivalent_to() must be an instance of IntlCalendar, int given
diff --git a/ext/intl/tests/calendar_isLenient_error.phpt b/ext/intl/tests/calendar_isLenient_error.phpt
index 263d82bb37..6fec307349 100644
--- a/ext/intl/tests/calendar_isLenient_error.phpt
+++ b/ext/intl/tests/calendar_isLenient_error.phpt
@@ -10,23 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->isLenient(1));
-
-var_dump(intlcal_is_lenient($c, 1));
var_dump(intlcal_is_lenient(1));
--EXPECTF--
-Warning: IntlCalendar::isLenient() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::isLenient(): intlcal_is_lenient: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_is_lenient() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_is_lenient(): intlcal_is_lenient: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_lenient() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_is_lenient(1)
diff --git a/ext/intl/tests/calendar_isSet_error.phpt b/ext/intl/tests/calendar_isSet_error.phpt
index 7e5b2beaa6..9cb266f742 100644
--- a/ext/intl/tests/calendar_isSet_error.phpt
+++ b/ext/intl/tests/calendar_isSet_error.phpt
@@ -12,31 +12,13 @@ ini_set("intl.error_level", E_WARNING);
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->isSet());
-var_dump($c->isSet(1, 2));
var_dump($c->isSet(-1));
-var_dump(intlcal_is_set($c));
var_dump(intlcal_is_set(1, 2));
--EXPECTF--
-Warning: IntlCalendar::isSet() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::isSet(): intlcal_is_set: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::isSet() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::isSet(): intlcal_is_set: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlCalendar::isSet(): intlcal_is_set: invalid field in %s on line %d
bool(false)
-Warning: intlcal_is_set() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: intlcal_is_set(): intlcal_is_set: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_set() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_is_set(1, 2)
diff --git a/ext/intl/tests/calendar_isWeekend_error.phpt b/ext/intl/tests/calendar_isWeekend_error.phpt
index c1f8180fa3..de40b2aee6 100644
--- a/ext/intl/tests/calendar_isWeekend_error.phpt
+++ b/ext/intl/tests/calendar_isWeekend_error.phpt
@@ -10,29 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->isWeekend(1, 2));
-var_dump($c->isWeekend("jhhk"));
-
-var_dump(intlcal_is_weekend($c, "jj"));
var_dump(intlcal_is_weekend(1));
--EXPECTF--
-Warning: IntlCalendar::isWeekend() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::isWeekend(): intlcal_is_weekend: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::isWeekend() expects parameter 1 to be float, string given in %s on line %d
-
-Warning: IntlCalendar::isWeekend(): intlcal_is_weekend: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_is_weekend() expects parameter 2 to be float, string given in %s on line %d
-
-Warning: intlcal_is_weekend(): intlcal_is_weekend: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_is_weekend() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_is_weekend(1)
diff --git a/ext/intl/tests/calendar_roll_error.phpt b/ext/intl/tests/calendar_roll_error.phpt
index 27160ee8ca..bc00896d8b 100644
--- a/ext/intl/tests/calendar_roll_error.phpt
+++ b/ext/intl/tests/calendar_roll_error.phpt
@@ -12,27 +12,13 @@ ini_set("intl.error_level", E_WARNING);
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->roll(1, 2, 3));
var_dump($c->roll(-1, 2));
-var_dump($c->roll(1));
-var_dump(intlcal_roll($c, 1, 2, 3));
var_dump(intlcal_roll(1, 2, 3));
--EXPECTF--
-Warning: IntlCalendar::roll(): intlcal_set: too many arguments in %s on line %d
-bool(false)
-
Warning: IntlCalendar::roll(): intlcal_roll: invalid field in %s on line %d
bool(false)
-Warning: IntlCalendar::roll() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::roll(): intlcal_roll: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_roll(): intlcal_set: too many arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_roll() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_roll(1, 2, 3)
diff --git a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt
index a22c3b2842..6dcff918a7 100644
--- a/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt
+++ b/ext/intl/tests/calendar_setFirstDayOfWeek_error.phpt
@@ -12,23 +12,11 @@ ini_set("intl.error_level", E_WARNING);
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->setFirstDayOfWeek());
-var_dump($c->setFirstDayOfWeek(1, 2));
var_dump($c->setFirstDayOfWeek(0));
var_dump(intlcal_set_first_day_of_week($c, 0));
var_dump(intlcal_set_first_day_of_week(1, 2));
--EXPECTF--
-Warning: IntlCalendar::setFirstDayOfWeek() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::setFirstDayOfWeek(): intlcal_set_first_day_of_week: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setFirstDayOfWeek() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::setFirstDayOfWeek(): intlcal_set_first_day_of_week: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlCalendar::setFirstDayOfWeek(): intlcal_set_first_day_of_week: invalid day of week in %s on line %d
bool(false)
diff --git a/ext/intl/tests/calendar_setLenient_error.phpt b/ext/intl/tests/calendar_setLenient_error.phpt
index b2a6f25d5d..2d73857c2b 100644
--- a/ext/intl/tests/calendar_setLenient_error.phpt
+++ b/ext/intl/tests/calendar_setLenient_error.phpt
@@ -10,35 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->setLenient());
-var_dump($c->setLenient(array()));
-var_dump($c->setLenient(1, 2));
-
-var_dump(intlcal_set_lenient($c, array()));
var_dump(intlcal_set_lenient(1, false));
--EXPECTF--
-Warning: IntlCalendar::setLenient() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::setLenient(): intlcal_set_lenient: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setLenient() expects parameter 1 to be bool, array given in %s on line %d
-
-Warning: IntlCalendar::setLenient(): intlcal_set_lenient: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setLenient() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::setLenient(): intlcal_set_lenient: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_set_lenient() expects parameter 2 to be bool, array given in %s on line %d
-
-Warning: intlcal_set_lenient(): intlcal_set_lenient: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_lenient() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_set_lenient(1, false)
diff --git a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt
index 48d18bf28d..430fc953bd 100644
--- a/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt
+++ b/ext/intl/tests/calendar_setMinimalDaysInFirstWeek_error.phpt
@@ -12,23 +12,11 @@ ini_set("intl.error_level", E_WARNING);
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->setMinimalDaysInFirstWeek());
-var_dump($c->setMinimalDaysInFirstWeek(1, 2));
var_dump($c->setMinimalDaysInFirstWeek(0));
var_dump(intlcal_set_minimal_days_in_first_week($c, 0));
var_dump(intlcal_set_minimal_days_in_first_week(1, 2));
--EXPECTF--
-Warning: IntlCalendar::setMinimalDaysInFirstWeek() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::setMinimalDaysInFirstWeek(): intlcal_set_minimal_days_in_first_week: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setMinimalDaysInFirstWeek() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::setMinimalDaysInFirstWeek(): intlcal_set_minimal_days_in_first_week: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlCalendar::setMinimalDaysInFirstWeek(): intlcal_set_minimal_days_in_first_week: invalid number of days; must be between 1 and 7 in %s on line %d
bool(false)
diff --git a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
index 776cb8b825..e3d03815dc 100644
--- a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
+++ b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
@@ -12,69 +12,17 @@ ini_set("intl.error_level", E_WARNING);
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->setSkippedWallTimeOption());
-var_dump($c->setRepeatedWallTimeOption());
-
-var_dump($c->setSkippedWallTimeOption(1, 2));
-var_dump($c->setRepeatedWallTimeOption(1, 2));
-
-var_dump($c->setSkippedWallTimeOption(array()));
-var_dump($c->setRepeatedWallTimeOption(array()));
-
var_dump($c->setSkippedWallTimeOption(3));
var_dump($c->setRepeatedWallTimeOption(2));
-var_dump(intlcal_set_skipped_wall_time_option($c));
-var_dump(intlcal_set_repeated_wall_time_option($c));
-
var_dump(intlcal_set_repeated_wall_time_option(1, 1));
--EXPECTF--
-Warning: IntlCalendar::setSkippedWallTimeOption() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::setSkippedWallTimeOption(): intlcal_set_skipped_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setRepeatedWallTimeOption() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setSkippedWallTimeOption() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::setSkippedWallTimeOption(): intlcal_set_skipped_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setRepeatedWallTimeOption() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setSkippedWallTimeOption() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlCalendar::setSkippedWallTimeOption(): intlcal_set_skipped_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setRepeatedWallTimeOption() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlCalendar::setSkippedWallTimeOption(): intlcal_set_skipped_wall_time_option: invalid option in %s on line %d
bool(false)
Warning: IntlCalendar::setRepeatedWallTimeOption(): intlcal_set_repeated_wall_time_option: invalid option in %s on line %d
bool(false)
-Warning: intlcal_set_skipped_wall_time_option() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: intlcal_set_skipped_wall_time_option(): intlcal_set_skipped_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_set_repeated_wall_time_option() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: intlcal_set_repeated_wall_time_option(): intlcal_set_repeated_wall_time_option: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_repeated_wall_time_option() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_set_repeated_wall_time_option(1, 1)
diff --git a/ext/intl/tests/calendar_setTimeZone_error.phpt b/ext/intl/tests/calendar_setTimeZone_error.phpt
index dee773d377..1cace3b4ea 100644
--- a/ext/intl/tests/calendar_setTimeZone_error.phpt
+++ b/ext/intl/tests/calendar_setTimeZone_error.phpt
@@ -41,13 +41,10 @@ try{
echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n";
}
--EXPECT--
-error: 2, IntlCalendar::setTimeZone() expects exactly 1 parameter, 2 given
-error: 2, IntlCalendar::setTimeZone(): intlcal_set_time_zone: bad arguments
-bool(false)
-error: 2, IntlCalendar::setTimeZone() expects exactly 1 parameter, 0 given
-error: 2, IntlCalendar::setTimeZone(): intlcal_set_time_zone: bad arguments
-bool(false)
-error: 2, intlcal_set_time_zone() expects exactly 2 parameters, 3 given
-error: 2, intlcal_set_time_zone(): intlcal_set_time_zone: bad arguments
-bool(false)
+error: 0, IntlCalendar::setTimeZone() expects exactly 1 parameter, 2 given
+
+error: 0, IntlCalendar::setTimeZone() expects exactly 1 parameter, 0 given
+
+error: 0, intlcal_set_time_zone() expects exactly 2 parameters, 3 given
+
error: 0, Argument 1 passed to intlcal_set_time_zone() must be an instance of IntlCalendar, int given
diff --git a/ext/intl/tests/calendar_setTime_error.phpt b/ext/intl/tests/calendar_setTime_error.phpt
index d3fa46c591..6ecbd698bf 100644
--- a/ext/intl/tests/calendar_setTime_error.phpt
+++ b/ext/intl/tests/calendar_setTime_error.phpt
@@ -10,29 +10,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-var_dump($c->setTime(1, 2));
-var_dump($c->setTime("jjj"));
-
-var_dump(intlcal_set_time($c, 1, 2));
var_dump(intlcal_set_time(1));
--EXPECTF--
-Warning: IntlCalendar::setTime() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlCalendar::setTime(): intlcal_set_time: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::setTime() expects parameter 1 to be float, string given in %s on line %d
-
-Warning: IntlCalendar::setTime(): intlcal_set_time: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_set_time() expects exactly 2 parameters, 3 given in %s on line %d
-
-Warning: intlcal_set_time(): intlcal_set_time: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_time() must be an instance of IntlCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlcal_set_time(1)
diff --git a/ext/intl/tests/calendar_set_error.phpt b/ext/intl/tests/calendar_set_error.phpt
index 5827ad41ec..2116786d32 100644
--- a/ext/intl/tests/calendar_set_error.phpt
+++ b/ext/intl/tests/calendar_set_error.phpt
@@ -12,22 +12,12 @@ ini_set("intl.error_level", E_WARNING);
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->set(1));
-var_dump($c->set(1, 2, 3, 4));
var_dump($c->set(1, 2, 3, 4, 5, 6, 7));
var_dump($c->set(-1, 2));
var_dump(intlcal_set($c, -1, 2));
var_dump(intlcal_set(1, 2, 3));
--EXPECTF--
-Warning: IntlCalendar::set() expects at least 2 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::set(): intlcal_set: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlCalendar::set(): intlcal_set: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlCalendar::set(): intlcal_set: too many arguments in %s on line %d
bool(false)
diff --git a/ext/intl/tests/calendar_toDateTime_error.phpt b/ext/intl/tests/calendar_toDateTime_error.phpt
index 584bd28f65..e251c501b6 100644
--- a/ext/intl/tests/calendar_toDateTime_error.phpt
+++ b/ext/intl/tests/calendar_toDateTime_error.phpt
@@ -9,11 +9,6 @@ if (!extension_loaded('intl'))
ini_set("intl.error_level", E_WARNING);
ini_set('date.timezone', 'Europe/Lisbon');
-$cal = new IntlGregorianCalendar();
-var_dump($cal->toDateTime(3));
-
-var_dump(intlcal_to_date_time($cal, 3));
-
$cal = new IntlGregorianCalendar("Etc/Unknown");
try {
var_dump($cal->toDateTime());
@@ -23,16 +18,6 @@ var_dump("exception: {$e->getMessage()}");
var_dump(intlcal_to_date_time(3));
--EXPECTF--
-Warning: IntlCalendar::toDateTime() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlCalendar::toDateTime(): intlcal_to_date_time: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlcal_to_date_time() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlcal_to_date_time(): intlcal_to_date_time: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlCalendar::toDateTime(): intlcal_to_date_time: DateTimeZone constructor threw exception in %s on line %d
string(77) "exception: DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)"
diff --git a/ext/intl/tests/cpbi_getLastCodePoint_error.phpt b/ext/intl/tests/cpbi_getLastCodePoint_error.phpt
deleted file mode 100644
index 505a076ca3..0000000000
--- a/ext/intl/tests/cpbi_getLastCodePoint_error.phpt
+++ /dev/null
@@ -1,17 +0,0 @@
---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)
diff --git a/ext/intl/tests/dateformat_formatObject_error.phpt b/ext/intl/tests/dateformat_formatObject_error.phpt
index bfcc951b73..24be090035 100644
--- a/ext/intl/tests/dateformat_formatObject_error.phpt
+++ b/ext/intl/tests/dateformat_formatObject_error.phpt
@@ -10,8 +10,6 @@ ini_set("intl.error_level", E_WARNING);
ini_set("intl.default_locale", "pt_PT");
ini_set("date.timezone", "Europe/Lisbon");
-var_dump(IntlDateFormatter::formatObject());
-var_dump(IntlDateFormatter::formatObject(1));
var_dump(IntlDateFormatter::formatObject(new stdclass));
class A extends IntlCalendar {function __construct(){}}
@@ -26,17 +24,10 @@ var_dump(IntlDateFormatter::formatObject($cal, array(1,2,3)));
var_dump(IntlDateFormatter::formatObject($cal, array(array(), 1)));
var_dump(IntlDateFormatter::formatObject($cal, array(1, -2)));
var_dump(IntlDateFormatter::formatObject($cal, ""));
-var_dump(IntlDateFormatter::formatObject($cal, "YYYY", array()));
?>
==DONE==
--EXPECTF--
-Warning: IntlDateFormatter::formatObject() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: IntlDateFormatter::formatObject() expects parameter 1 to be object, int given in %s on line %d
-bool(false)
-
Warning: IntlDateFormatter::formatObject(): datefmt_format_object: the passed object must be an instance of either IntlCalendar or DateTime in %s on line %d
bool(false)
@@ -65,7 +56,4 @@ bool(false)
Warning: IntlDateFormatter::formatObject(): datefmt_format_object: the format is empty in %s on line %d
bool(false)
-
-Warning: IntlDateFormatter::formatObject() expects parameter 3 to be string, array given in %s on line %d
-bool(false)
==DONE==
diff --git a/ext/intl/tests/dateformat_getCalendarObject_error.phpt b/ext/intl/tests/dateformat_getCalendarObject_error.phpt
deleted file mode 100644
index d5a7833ded..0000000000
--- a/ext/intl/tests/dateformat_getCalendarObject_error.phpt
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-IntlDateFormatter::getCalendarObject(): bad args
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-ini_set("intl.default_locale", "pt_PT");
-ini_set("date.timezone", 'Atlantic/Azores');
-
-$df = new IntlDateFormatter(NULL, 0, 0);
-
-var_dump($df->getCalendarObject(9));
-var_dump(datefmt_get_calendar_object($df, 9));
-var_dump(datefmt_get_calendar_object($df, 9));
-var_dump(datefmt_get_calendar_object(new stdclass));
-
-?>
-==DONE==
---EXPECTF--
-Warning: IntlDateFormatter::getCalendarObject() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlDateFormatter::getCalendarObject(): datefmt_get_calendar_object: unable to parse input params in %s on line %d
-bool(false)
-
-Warning: datefmt_get_calendar_object() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: datefmt_get_calendar_object(): datefmt_get_calendar_object: unable to parse input params in %s on line %d
-bool(false)
-
-Warning: datefmt_get_calendar_object() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: datefmt_get_calendar_object(): datefmt_get_calendar_object: unable to parse input params in %s on line %d
-bool(false)
-
-Warning: datefmt_get_calendar_object() expects parameter 1 to be IntlDateFormatter, object given in %s on line %d
-
-Warning: datefmt_get_calendar_object(): datefmt_get_calendar_object: unable to parse input params in %s on line %d
-bool(false)
-==DONE==
diff --git a/ext/intl/tests/dateformat_getTimeZone_error.phpt b/ext/intl/tests/dateformat_getTimeZone_error.phpt
deleted file mode 100644
index d2ab92d86a..0000000000
--- a/ext/intl/tests/dateformat_getTimeZone_error.phpt
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-IntlDateFormatter::getTimeZone(): bad args
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-ini_set("intl.default_locale", "pt_PT");
-ini_set("date.timezone", 'Atlantic/Azores');
-
-$df = new IntlDateFormatter(NULL, 0, 0);
-
-var_dump($df->getTimeZone(9));
-var_dump(datefmt_get_timezone($df, 9));
-var_dump(datefmt_get_timezone($df, 9));
-var_dump(datefmt_get_timezone(new stdclass));
-
-?>
-==DONE==
---EXPECTF--
-Warning: IntlDateFormatter::getTimeZone() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlDateFormatter::getTimeZone(): datefmt_get_timezone: unable to parse input params in %s on line %d
-bool(false)
-
-Warning: datefmt_get_timezone() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d
-bool(false)
-
-Warning: datefmt_get_timezone() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d
-bool(false)
-
-Warning: datefmt_get_timezone() expects parameter 1 to be IntlDateFormatter, object given in %s on line %d
-
-Warning: datefmt_get_timezone(): datefmt_get_timezone: unable to parse input params in %s on line %d
-bool(false)
-==DONE==
diff --git a/ext/intl/tests/dateformat_setTimeZone_error.phpt b/ext/intl/tests/dateformat_setTimeZone_error.phpt
index b58d159088..e5ba550910 100644
--- a/ext/intl/tests/dateformat_setTimeZone_error.phpt
+++ b/ext/intl/tests/dateformat_setTimeZone_error.phpt
@@ -12,41 +12,17 @@ ini_set("date.timezone", 'Atlantic/Azores');
$df = new IntlDateFormatter(NULL, 0, 0);
-var_dump($df->setTimeZone());
-var_dump(datefmt_set_timezone());
var_dump($df->setTimeZone(array()));
-var_dump($df->setTimeZone(1, 2));
var_dump($df->setTimeZone('non existing timezone'));
-var_dump(datefmt_set_timezone(new stdclass, 'UTC'));
?>
==DONE==
--EXPECTF--
-Warning: IntlDateFormatter::setTimeZone() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: unable to parse input params in %s on line %d
-bool(false)
-
-Warning: datefmt_set_timezone() expects exactly 2 parameters, 0 given in %s on line %d
-
-Warning: datefmt_set_timezone(): datefmt_set_timezone: unable to parse input params in %s on line %d
-bool(false)
-
Notice: Array to string conversion in %s on line %d
Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: no such time zone: 'Array' in %s on line %d
bool(false)
-Warning: IntlDateFormatter::setTimeZone() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: unable to parse input params in %s on line %d
-bool(false)
-
Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: no such time zone: 'non existing timezone' in %s on line %d
bool(false)
-
-Warning: datefmt_set_timezone() expects parameter 1 to be IntlDateFormatter, object given in %s on line %d
-
-Warning: datefmt_set_timezone(): datefmt_set_timezone: unable to parse input params in %s on line %d
-bool(false)
==DONE==
diff --git a/ext/intl/tests/formatter_fail.phpt b/ext/intl/tests/formatter_fail.phpt
index 9cfc6f5054..0a8d7f398b 100644
--- a/ext/intl/tests/formatter_fail.phpt
+++ b/ext/intl/tests/formatter_fail.phpt
@@ -27,10 +27,20 @@ function crt($t, $l, $s) {
}
break;
case $t == "C":
- return NumberFormatter::create($l, $s);
+ try {
+ return NumberFormatter::create($l, $s);
+ } catch (Throwable $e) {
+ print_exception($e);
+ return null;
+ }
break;
case $t == "P":
- return numfmt_create($l, $s);
+ try {
+ return numfmt_create($l, $s);
+ } catch (Throwable $e) {
+ print_exception($e);
+ return null;
+ }
break;
}
}
@@ -50,9 +60,19 @@ try {
$fmt = null;
}
err($fmt);
-$fmt = numfmt_create();
+try {
+ $fmt = numfmt_create();
+} catch (TypeError $e) {
+ print_exception($e);
+ $fmt = null;
+}
err($fmt);
-$fmt = NumberFormatter::create();
+try {
+ $fmt = NumberFormatter::create();
+} catch (TypeError $e) {
+ print_exception($e);
+ $fmt = null;
+}
err($fmt);
foreach($args as $arg) {
@@ -67,34 +87,34 @@ foreach($args as $arg) {
?>
--EXPECTF--
ArgumentCountError: NumberFormatter::__construct() expects at least 2 parameters, 0 given in %s on line %d
-'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+'U_ZERO_ERROR'
-Warning: numfmt_create() expects at least 2 parameters, 0 given in %s on line %d
-'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: numfmt_create() expects at least 2 parameters, 0 given in %s on line %d
+'U_ZERO_ERROR'
-Warning: NumberFormatter::create() expects at least 2 parameters, 0 given in %s on line %d
-'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: NumberFormatter::create() expects at least 2 parameters, 0 given in %s on line %d
+'U_ZERO_ERROR'
-IntlException: Constructor failed in %sformatter_fail.php on line %d
+IntlException: Constructor failed in %s on line %d
'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
TypeError: NumberFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d
-'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+'U_ZERO_ERROR'
-Warning: NumberFormatter::create() expects parameter 1 to be string, array given in %s on line %d
-'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+TypeError: NumberFormatter::create() expects parameter 1 to be string, array given in %s on line %d
+'U_ZERO_ERROR'
-Warning: numfmt_create() expects parameter 1 to be string, array given in %s on line %d
-'numfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+TypeError: numfmt_create() expects parameter 1 to be string, array given in %s on line %d
+'U_ZERO_ERROR'
-IntlException: Constructor failed in %sformatter_fail.php on line %d
+IntlException: Constructor failed in %s on line %d
'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
-IntlException: Constructor failed in %sformatter_fail.php on line %d
+IntlException: Constructor failed in %s on line %d
'numfmt_create: number formatter creation failed: U_MEMORY_ALLOCATION_ERROR'
'numfmt_create: number formatter creation failed: U_MEMORY_ALLOCATION_ERROR'
'numfmt_create: number formatter creation failed: U_MEMORY_ALLOCATION_ERROR'
diff --git a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt
index a1cfb593d7..3353690d1c 100644
--- a/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt
+++ b/ext/intl/tests/gregoriancalendar_getGregorianChange_error.phpt
@@ -10,22 +10,10 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->getGregorianChange(1));
-
-var_dump(intlgregcal_get_gregorian_change($c, 1));
var_dump(intlgregcal_get_gregorian_change(1));
---EXPECTF--
-Warning: IntlGregorianCalendar::getGregorianChange() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlGregorianCalendar::getGregorianChange(): intlgregcal_get_gregorian_change: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlgregcal_get_gregorian_change() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: intlgregcal_get_gregorian_change(): intlgregcal_get_gregorian_change: bad arguments in %s on line %d
-bool(false)
+?>
+--EXPECTF--
Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_get_gregorian_change() must be an instance of IntlGregorianCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlgregcal_get_gregorian_change(1)
diff --git a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt
index 9da5aaf418..701e643e00 100644
--- a/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt
+++ b/ext/intl/tests/gregoriancalendar_isLeapYear_error.phpt
@@ -10,40 +10,10 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-var_dump($c->isLeapYear(2000, 2011));
-var_dump($c->isLeapYear());
-var_dump($c->isLeapYear("fgdf"));
-
-var_dump(intlgregcal_is_leap_year($c, 1, 2));
-var_dump(intlgregcal_is_leap_year($c));
var_dump(intlgregcal_is_leap_year(1, 2));
---EXPECTF--
-Warning: IntlGregorianCalendar::isLeapYear() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlGregorianCalendar::isLeapYear(): intlgregcal_is_leap_year: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlGregorianCalendar::isLeapYear() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlGregorianCalendar::isLeapYear(): intlgregcal_is_leap_year: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlGregorianCalendar::isLeapYear() expects parameter 1 to be int, string given in %s on line %d
-
-Warning: IntlGregorianCalendar::isLeapYear(): intlgregcal_is_leap_year: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlgregcal_is_leap_year() expects exactly 2 parameters, 3 given in %s on line %d
-
-Warning: intlgregcal_is_leap_year(): intlgregcal_is_leap_year: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlgregcal_is_leap_year() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: intlgregcal_is_leap_year(): intlgregcal_is_leap_year: bad arguments in %s on line %d
-bool(false)
+?>
+--EXPECTF--
Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_is_leap_year() must be an instance of IntlGregorianCalendar, int given in %s:%d
Stack trace:
#0 %s(%d): intlgregcal_is_leap_year(1, 2)
diff --git a/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt b/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt
deleted file mode 100644
index 0dd27802b5..0000000000
--- a/ext/intl/tests/gregoriancalendar_setGregorianChange_error.phpt
+++ /dev/null
@@ -1,45 +0,0 @@
---TEST--
-IntlGregorianCalendar::setGregorianChange(): bad arguments
---INI--
-date.timezone=Atlantic/Azores
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$c = new IntlGregorianCalendar();
-var_dump($c->setGregorianChange());
-var_dump($c->setGregorianChange(1, 2));
-var_dump($c->setGregorianChange("sdfds"));
-
-var_dump(intlgregcal_set_gregorian_change($c));
-var_dump(intlgregcal_set_gregorian_change(1, 4.));
---EXPECTF--
-Warning: IntlGregorianCalendar::setGregorianChange() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlGregorianCalendar::setGregorianChange(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlGregorianCalendar::setGregorianChange() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlGregorianCalendar::setGregorianChange(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlGregorianCalendar::setGregorianChange() expects parameter 1 to be float, string given in %s on line %d
-
-Warning: IntlGregorianCalendar::setGregorianChange(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
-bool(false)
-
-Warning: intlgregcal_set_gregorian_change() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: intlgregcal_set_gregorian_change(): intlgregcal_set_gregorian_change: bad arguments in %s on line %d
-bool(false)
-
-Fatal error: Uncaught TypeError: Argument 1 passed to intlgregcal_set_gregorian_change() must be an instance of IntlGregorianCalendar, int given in %s:%d
-Stack trace:
-#0 %s(%d): intlgregcal_set_gregorian_change(1, 4)
-#1 {main}
- thrown in %s on line %d
diff --git a/ext/intl/tests/idn_uts46_errors.phpt b/ext/intl/tests/idn_uts46_errors.phpt
index 55d2d56215..e468e8caf8 100644
--- a/ext/intl/tests/idn_uts46_errors.phpt
+++ b/ext/intl/tests/idn_uts46_errors.phpt
@@ -11,10 +11,6 @@ IDN UTS #46 API error tests
ini_set("intl.error_level", E_WARNING);
echo "=> PHP level errors", "\n";
-echo "bad args:", "\n";
-var_dump(idn_to_ascii("", 0, array()));
-var_dump(idn_to_ascii("", 0, INTL_IDNA_VARIANT_UTS46, $foo, null));
-
echo "bad variant:", "\n";
var_dump(idn_to_ascii("", 0, INTL_IDNA_VARIANT_UTS46 + 10));
@@ -36,19 +32,10 @@ var_dump(idn_to_ascii(
INTL_IDNA_VARIANT_UTS46, $foo));
var_dump($foo);
var_dump($foo["errors"]==IDNA_ERROR_CONTEXTJ);
+
+?>
--EXPECTF--
=> PHP level errors
-bad args:
-
-Warning: idn_to_ascii() expects parameter 3 to be int, array given in %s on line %d
-
-Warning: idn_to_ascii(): idn_to_ascii: bad arguments in %s on line %d
-NULL
-
-Warning: idn_to_ascii() expects at most 4 parameters, 5 given in %s on line %d
-
-Warning: idn_to_ascii(): idn_to_ascii: bad arguments in %s on line %d
-NULL
bad variant:
Warning: idn_to_ascii(): idn_to_ascii: invalid variant, must be INTL_IDNA_VARIANT_UTS46 in %s on line %d
diff --git a/ext/intl/tests/intl_get_error_code.phpt b/ext/intl/tests/intl_get_error_code.phpt
index 6cd361ba71..797aee4fb7 100644
--- a/ext/intl/tests/intl_get_error_code.phpt
+++ b/ext/intl/tests/intl_get_error_code.phpt
@@ -11,7 +11,7 @@ intl_get_error_code()
// Suppress warning messages.
error_reporting( E_ERROR );
-if( collator_get_locale() !== false )
+if( collator_get_locale(new Collator('en_US'), -1) !== false )
echo "failed\n";
else
{
diff --git a/ext/intl/tests/intl_get_error_message.phpt b/ext/intl/tests/intl_get_error_message.phpt
index f81b5c03d5..e03fb80658 100644
--- a/ext/intl/tests/intl_get_error_message.phpt
+++ b/ext/intl/tests/intl_get_error_message.phpt
@@ -11,11 +11,11 @@ intl_get_error_message()
// Suppress warning messages.
error_reporting( E_ERROR );
-if( collator_get_locale() !== false )
+if( collator_get_locale(new Collator('en_US'), -1) !== false )
echo "failed\n";
else
printf( "%s\n", intl_get_error_message() );
?>
--EXPECT--
-collator_get_locale: unable to parse input params: U_ILLEGAL_ARGUMENT_ERROR
+Error getting locale by type: U_ILLEGAL_ARGUMENT_ERROR
diff --git a/ext/intl/tests/locale_accept.phpt b/ext/intl/tests/locale_accept.phpt
index a2834d8ade..6a29cd6723 100644
--- a/ext/intl/tests/locale_accept.phpt
+++ b/ext/intl/tests/locale_accept.phpt
@@ -19,7 +19,6 @@ function ut_main()
'zh, en-us;q=0.8, en;q=0.7',
'xx, fr-FR;q=0.3, de-DE;q=0.5',
'none',
- array()
);
foreach($http_acc as $http) {
@@ -34,13 +33,9 @@ include_once( 'ut_common.inc' );
ut_run();
?>
---EXPECTF--
-Warning: Locale::acceptFromHttp() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: locale_accept_from_http() expects parameter 1 to be string, array given in %s on line %d
+--EXPECT--
Accepting en-us,en;q=0.5: en_US
Accepting da, en-gb;q=0.8, en;q=0.7: da
Accepting zh, en-us;q=0.8, en;q=0.7: zh
Accepting xx, fr-FR;q=0.3, de-DE;q=0.5: de_DE
Accepting none:
-Accepting Array:
diff --git a/ext/intl/tests/msgfmt_fail2.phpt b/ext/intl/tests/msgfmt_fail2.phpt
index 0016de4bb7..688e65a861 100644
--- a/ext/intl/tests/msgfmt_fail2.phpt
+++ b/ext/intl/tests/msgfmt_fail2.phpt
@@ -27,10 +27,20 @@ function crt($t, $l, $s) {
}
break;
case $t == "C":
- return MessageFormatter::create($l, $s);
+ try {
+ return MessageFormatter::create($l, $s);
+ } catch (Throwable $e) {
+ print_exception($e);
+ return null;
+ }
break;
case $t == "P":
- return msgfmt_create($l, $s);
+ try {
+ return msgfmt_create($l, $s);
+ } catch (Throwable $e) {
+ print_exception($e);
+ return null;
+ }
break;
}
}
@@ -51,9 +61,19 @@ try {
$fmt = null;
}
err($fmt);
-$fmt = msgfmt_create();
+try {
+ $fmt = msgfmt_create();
+} catch (TypeError $e) {
+ print_exception($e);
+ $fmt = null;
+}
err($fmt);
-$fmt = MessageFormatter::create();
+try {
+ $fmt = MessageFormatter::create();
+} catch (TypeError $e) {
+ print_exception($e);
+ $fmt = null;
+}
err($fmt);
try {
$fmt = new MessageFormatter('en');
@@ -62,9 +82,19 @@ try {
$fmt = null;
}
err($fmt);
-$fmt = msgfmt_create('en');
+try {
+ $fmt = msgfmt_create('en');
+} catch (TypeError $e) {
+ print_exception($e);
+ $fmt = null;
+}
err($fmt);
-$fmt = MessageFormatter::create('en');
+try {
+ $fmt = MessageFormatter::create('en');
+} catch (TypeError $e) {
+ print_exception($e);
+ $fmt = null;
+}
err($fmt);
foreach($args as $arg) {
@@ -79,53 +109,53 @@ foreach($args as $arg) {
?>
--EXPECTF--
ArgumentCountError: MessageFormatter::__construct() expects exactly 2 parameters, 0 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+'U_ZERO_ERROR'
-Warning: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d
+'U_ZERO_ERROR'
-Warning: MessageFormatter::create() expects exactly 2 parameters, 0 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: MessageFormatter::create() expects exactly 2 parameters, 0 given in %s on line %d
+'U_ZERO_ERROR'
ArgumentCountError: MessageFormatter::__construct() expects exactly 2 parameters, 1 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+'U_ZERO_ERROR'
-Warning: msgfmt_create() expects exactly 2 parameters, 1 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: msgfmt_create() expects exactly 2 parameters, 1 given in %s on line %d
+'U_ZERO_ERROR'
-Warning: MessageFormatter::create() expects exactly 2 parameters, 1 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+ArgumentCountError: MessageFormatter::create() expects exactly 2 parameters, 1 given in %s on line %d
+'U_ZERO_ERROR'
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
+IntlException: Constructor failed in %s on line %d
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
+IntlException: Constructor failed in %s on line %d
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
TypeError: MessageFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+'U_ZERO_ERROR'
-Warning: MessageFormatter::create() expects parameter 1 to be string, array given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+TypeError: MessageFormatter::create() expects parameter 1 to be string, array given in %s on line %d
+'U_ZERO_ERROR'
-Warning: msgfmt_create() expects parameter 1 to be string, array given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
+TypeError: msgfmt_create() expects parameter 1 to be string, array given in %s on line %d
+'U_ZERO_ERROR'
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
+IntlException: Constructor failed in %s on line %d
'msgfmt_create: message formatter creation failed: U_PATTERN_SYNTAX_ERROR'
'msgfmt_create: message formatter creation failed: U_PATTERN_SYNTAX_ERROR'
'msgfmt_create: message formatter creation failed: U_PATTERN_SYNTAX_ERROR'
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
+IntlException: Constructor failed in %s on line %d
'msgfmt_create: message formatter creation failed: U_UNMATCHED_BRACES'
'msgfmt_create: message formatter creation failed: U_UNMATCHED_BRACES'
'msgfmt_create: message formatter creation failed: U_UNMATCHED_BRACES'
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
+IntlException: Constructor failed in %s on line %d
'msgfmt_create: error converting pattern to UTF-16: U_INVALID_CHAR_FOUND'
'msgfmt_create: error converting pattern to UTF-16: U_INVALID_CHAR_FOUND'
'msgfmt_create: error converting pattern to UTF-16: U_INVALID_CHAR_FOUND'
diff --git a/ext/intl/tests/timezone_countEquivalentIDs_error.phpt b/ext/intl/tests/timezone_countEquivalentIDs_error.phpt
index 3087f49cbe..4fc9b02a1d 100644
--- a/ext/intl/tests/timezone_countEquivalentIDs_error.phpt
+++ b/ext/intl/tests/timezone_countEquivalentIDs_error.phpt
@@ -8,25 +8,7 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-var_dump(IntlTimeZone::countEquivalentIDs());
-var_dump(IntlTimeZone::countEquivalentIDs(array()));
var_dump(IntlTimeZone::countEquivalentIDs("foo\x80"));
-var_dump(IntlTimeZone::countEquivalentIDs("foo bar", 7));
--EXPECTF--
-Warning: IntlTimeZone::countEquivalentIDs() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlTimeZone::countEquivalentIDs(): intltz_count_equivalent_ids: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::countEquivalentIDs() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: IntlTimeZone::countEquivalentIDs(): intltz_count_equivalent_ids: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlTimeZone::countEquivalentIDs(): intltz_count_equivalent_ids: could not convert time zone id to UTF-16 in %s on line %d
bool(false)
-
-Warning: IntlTimeZone::countEquivalentIDs() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlTimeZone::countEquivalentIDs(): intltz_count_equivalent_ids: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/timezone_createDefault_error.phpt b/ext/intl/tests/timezone_createDefault_error.phpt
deleted file mode 100644
index f2f2e021b9..0000000000
--- a/ext/intl/tests/timezone_createDefault_error.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-IntlTimeZone::createDefault(): errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(IntlTimeZone::createDefault(4));
---EXPECTF--
-Warning: IntlTimeZone::createDefault() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::createDefault(): intltz_create_default: bad arguments in %s on line %d
-NULL
diff --git a/ext/intl/tests/timezone_createEnumeration_error.phpt b/ext/intl/tests/timezone_createEnumeration_error.phpt
index ea92e28d95..4e190129d4 100644
--- a/ext/intl/tests/timezone_createEnumeration_error.phpt
+++ b/ext/intl/tests/timezone_createEnumeration_error.phpt
@@ -9,12 +9,7 @@ if (!extension_loaded('intl'))
ini_set("intl.error_level", E_WARNING);
var_dump(IntlTimeZone::createEnumeration(array()));
-var_dump(IntlTimeZone::createEnumeration(1, 2));
+?>
--EXPECTF--
Warning: IntlTimeZone::createEnumeration(): intltz_create_enumeration: invalid argument type in %s on line %d
bool(false)
-
-Warning: IntlTimeZone::createEnumeration() expects at most 1 parameter, 2 given in %s on line %d
-
-Warning: IntlTimeZone::createEnumeration(): intltz_create_enumeration: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt
index 5edfaeaf6b..2b847ec841 100644
--- a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt
+++ b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt
@@ -8,31 +8,7 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-var_dump(IntlTimeZone::createTimeZoneIDEnumeration());
-var_dump(IntlTimeZone::createTimeZoneIDEnumeration(array()));
var_dump(IntlTimeZone::createTimeZoneIDEnumeration(-1));
-var_dump(IntlTimeZone::createTimeZoneIDEnumeration(IntlTimeZone::TYPE_ANY, array()));
-var_dump(IntlTimeZone::createTimeZoneIDEnumeration(IntlTimeZone::TYPE_ANY, "PT", "a80"));
--EXPECTF--
-Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects parameter 1 to be int, array given in %s on line %d
-
-Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad zone type in %s on line %d
bool(false)
-
-Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects parameter 2 to be string, array given in %s on line %d
-
-Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::createTimeZoneIDEnumeration() expects parameter 3 to be int, string given in %s on line %d
-
-Warning: IntlTimeZone::createTimeZoneIDEnumeration(): intltz_create_time_zone_id_enumeration: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/timezone_createTimeZone_error.phpt b/ext/intl/tests/timezone_createTimeZone_error.phpt
index 553223ee4c..a06f26b128 100644
--- a/ext/intl/tests/timezone_createTimeZone_error.phpt
+++ b/ext/intl/tests/timezone_createTimeZone_error.phpt
@@ -8,25 +8,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-var_dump(IntlTimeZone::createTimeZone());
-var_dump(IntlTimeZone::createTimeZone(new stdClass));
-var_dump(IntlTimeZone::createTimeZone("foo bar", 4));
var_dump(IntlTimeZone::createTimeZone("foo\x80"));
+?>
--EXPECTF--
-Warning: IntlTimeZone::createTimeZone() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d
-NULL
-
-Warning: IntlTimeZone::createTimeZone() expects parameter 1 to be string, object given in %s on line %d
-
-Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d
-NULL
-
-Warning: IntlTimeZone::createTimeZone() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: bad arguments in %s on line %d
-NULL
-
Warning: IntlTimeZone::createTimeZone(): intltz_create_time_zone: could not convert time zone id to UTF-16 in %s on line %d
NULL
diff --git a/ext/intl/tests/timezone_fromDateTimeZone_error.phpt b/ext/intl/tests/timezone_fromDateTimeZone_error.phpt
index f50e59f97c..54a70d1f17 100644
--- a/ext/intl/tests/timezone_fromDateTimeZone_error.phpt
+++ b/ext/intl/tests/timezone_fromDateTimeZone_error.phpt
@@ -10,39 +10,9 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-var_dump(IntlTimeZone::fromDateTimeZone());
-var_dump(IntlTimeZone::fromDateTimeZone(1,2));
-var_dump(IntlTimeZone::fromDateTimeZone('sdfds'));
-var_dump(IntlTimeZone::fromDateTimeZone(new stdclass));
$dt = new DateTime('2012-08-01 00:00:00 WEST');
var_dump(IntlTimeZone::fromDateTimeZone($dt->getTimeZone()));
-
-var_dump(intltz_from_date_time_zone());
+?>
--EXPECTF--
-Warning: IntlTimeZone::fromDateTimeZone() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d
-NULL
-
-Warning: IntlTimeZone::fromDateTimeZone() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d
-NULL
-
-Warning: IntlTimeZone::fromDateTimeZone() expects parameter 1 to be DateTimeZone, string given in %s on line %d
-
-Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d
-NULL
-
-Warning: IntlTimeZone::fromDateTimeZone() expects parameter 1 to be DateTimeZone, object given in %s on line %d
-
-Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: bad arguments in %s on line %d
-NULL
-
Warning: IntlTimeZone::fromDateTimeZone(): intltz_from_date_time_zone: time zone id 'WEST' extracted from ext/date DateTimeZone not recognized in %s on line %d
NULL
-
-Warning: intltz_from_date_time_zone() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: intltz_from_date_time_zone(): intltz_from_date_time_zone: bad arguments in %s on line %d
-NULL
diff --git a/ext/intl/tests/timezone_getCanonicalID_error.phpt b/ext/intl/tests/timezone_getCanonicalID_error.phpt
index 684d946b1e..c1f7b6927a 100644
--- a/ext/intl/tests/timezone_getCanonicalID_error.phpt
+++ b/ext/intl/tests/timezone_getCanonicalID_error.phpt
@@ -8,19 +8,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-var_dump(IntlTimeZone::getCanonicalID());
-var_dump(IntlTimeZone::getCanonicalID(array()));
var_dump(IntlTimeZone::getCanonicalID("foo\x81"));
+?>
--EXPECTF--
-Warning: IntlTimeZone::getCanonicalID() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getCanonicalID() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: could not convert time zone id to UTF-16 in %s on line %d
bool(false)
diff --git a/ext/intl/tests/timezone_getDSTSavings_error.phpt b/ext/intl/tests/timezone_getDSTSavings_error.phpt
index 9df04f08c1..ebb0eb7776 100644
--- a/ext/intl/tests/timezone_getDSTSavings_error.phpt
+++ b/ext/intl/tests/timezone_getDSTSavings_error.phpt
@@ -8,16 +8,9 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
-var_dump($tz->getDSTSavings(array()));
-
var_dump(intltz_get_dst_savings(null));
+?>
--EXPECTF--
-Warning: IntlTimeZone::getDSTSavings() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getDSTSavings(): intltz_get_dst_savings: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_dst_savings() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_get_dst_savings(NULL)
diff --git a/ext/intl/tests/timezone_getDisplayName_error.phpt b/ext/intl/tests/timezone_getDisplayName_error.phpt
index 8d30f8840f..108530d2c3 100644
--- a/ext/intl/tests/timezone_getDisplayName_error.phpt
+++ b/ext/intl/tests/timezone_getDisplayName_error.phpt
@@ -9,37 +9,13 @@ if (!extension_loaded('intl'))
ini_set("intl.error_level", E_WARNING);
$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
-var_dump($tz->getDisplayName(array()));
-var_dump($tz->getDisplayName(false, array()));
var_dump($tz->getDisplayName(false, -1));
-var_dump($tz->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT, array()));
-var_dump($tz->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT, NULL, NULL));
var_dump(intltz_get_display_name(null, IntlTimeZone::DISPLAY_SHORT, false, 'pt_PT'));
--EXPECTF--
-Warning: IntlTimeZone::getDisplayName() expects parameter 1 to be bool, array given in %s on line %d
-
-Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getDisplayName() expects parameter 2 to be int, array given in %s on line %d
-
-Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: wrong display type in %s on line %d
bool(false)
-Warning: IntlTimeZone::getDisplayName() expects parameter 3 to be string, array given in %s on line %d
-
-Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getDisplayName() expects at most 3 parameters, 4 given in %s on line %d
-
-Warning: IntlTimeZone::getDisplayName(): intltz_get_display_name: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_display_name() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_get_display_name(NULL, 1, false, 'pt_PT')
diff --git a/ext/intl/tests/timezone_getEquivalentID_error.phpt b/ext/intl/tests/timezone_getEquivalentID_error.phpt
index facb8fe8cf..12afaee2fa 100644
--- a/ext/intl/tests/timezone_getEquivalentID_error.phpt
+++ b/ext/intl/tests/timezone_getEquivalentID_error.phpt
@@ -8,25 +8,8 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-var_dump(IntlTimeZone::getEquivalentID('foo'));
-var_dump(IntlTimeZone::getEquivalentID('foo', 'bar'));
-var_dump(IntlTimeZone::getEquivalentID('Europe/Lisbon', 0, 1));
var_dump(IntlTimeZone::getEquivalentID("foo\x80", 0));
+?>
--EXPECTF--
-Warning: IntlTimeZone::getEquivalentID() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getEquivalentID() expects parameter 2 to be int, string given in %s on line %d
-
-Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getEquivalentID() expects exactly 2 parameters, 3 given in %s on line %d
-
-Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlTimeZone::getEquivalentID(): intltz_get_equivalent_id: could not convert time zone id to UTF-16 in %s on line %d
bool(false)
diff --git a/ext/intl/tests/timezone_getErrorCode_error.phpt b/ext/intl/tests/timezone_getErrorCode_error.phpt
index f5b06b0757..657e09b240 100644
--- a/ext/intl/tests/timezone_getErrorCode_error.phpt
+++ b/ext/intl/tests/timezone_getErrorCode_error.phpt
@@ -8,16 +8,9 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
-var_dump($tz->getErrorCode(array()));
-
var_dump(intltz_get_error_code(null));
+?>
--EXPECTF--
-Warning: IntlTimeZone::getErrorCode() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getErrorCode(): intltz_get_error_code: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_error_code() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_get_error_code(NULL)
diff --git a/ext/intl/tests/timezone_getErrorMessage_error.phpt b/ext/intl/tests/timezone_getErrorMessage_error.phpt
index 6b8ce7d5c8..3ea812050b 100644
--- a/ext/intl/tests/timezone_getErrorMessage_error.phpt
+++ b/ext/intl/tests/timezone_getErrorMessage_error.phpt
@@ -8,16 +8,9 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
-var_dump($tz->getErrorMessage(array()));
-
var_dump(intltz_get_error_message(null));
+?>
--EXPECTF--
-Warning: IntlTimeZone::getErrorMessage() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getErrorMessage(): intltz_get_error_message: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_error_message() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_get_error_message(NULL)
diff --git a/ext/intl/tests/timezone_getGMT_error.phpt b/ext/intl/tests/timezone_getGMT_error.phpt
deleted file mode 100644
index ca478a10d1..0000000000
--- a/ext/intl/tests/timezone_getGMT_error.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-IntlTimeZone::getGMT(): errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(IntlTimeZone::getGMT(4));
---EXPECTF--
-Warning: IntlTimeZone::getGMT() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getGMT(): intltz_get_gmt: bad arguments in %s on line %d
-NULL
diff --git a/ext/intl/tests/timezone_getID_error.phpt b/ext/intl/tests/timezone_getID_error.phpt
index 4d0ffeb96f..81d36b9d0b 100644
--- a/ext/intl/tests/timezone_getID_error.phpt
+++ b/ext/intl/tests/timezone_getID_error.phpt
@@ -8,15 +8,9 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
-var_dump($tz->getID('foo'));
intltz_get_id(null);
+?>
--EXPECTF--
-Warning: IntlTimeZone::getID() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getID(): intltz_get_id: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_id() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_get_id(NULL)
diff --git a/ext/intl/tests/timezone_getOffset_error.phpt b/ext/intl/tests/timezone_getOffset_error.phpt
index d66716e552..3ae06e4ce0 100644
--- a/ext/intl/tests/timezone_getOffset_error.phpt
+++ b/ext/intl/tests/timezone_getOffset_error.phpt
@@ -10,24 +10,13 @@ ini_set("intl.error_level", E_WARNING);
$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
var_dump($tz->getOffset(INF, true, $a, $a));
-var_dump($tz->getOffset(time()*1000, true, $a));
-var_dump($tz->getOffset(time()*1000, true, $a, $a, $a));
intltz_get_offset(null, time()*1000, false, $a, $a);
+?>
--EXPECTF--
Warning: IntlTimeZone::getOffset(): intltz_get_offset: error obtaining offset in %s on line %d
bool(false)
-Warning: IntlTimeZone::getOffset() expects exactly 4 parameters, 3 given in %s on line %d
-
-Warning: IntlTimeZone::getOffset(): intltz_get_offset: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getOffset() expects exactly 4 parameters, 5 given in %s on line %d
-
-Warning: IntlTimeZone::getOffset(): intltz_get_offset: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_offset() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_get_offset(NULL, %d, false, NULL, NULL)
diff --git a/ext/intl/tests/timezone_getRawOffset_error.phpt b/ext/intl/tests/timezone_getRawOffset_error.phpt
index dc7df51cca..9e0691f39d 100644
--- a/ext/intl/tests/timezone_getRawOffset_error.phpt
+++ b/ext/intl/tests/timezone_getRawOffset_error.phpt
@@ -8,16 +8,9 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
-var_dump($tz->getRawOffset('foo'));
-
intltz_get_raw_offset(null);
+?>
--EXPECTF--
-Warning: IntlTimeZone::getRawOffset() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getRawOffset(): intltz_get_raw_offset: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intltz_get_raw_offset() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_get_raw_offset(NULL)
diff --git a/ext/intl/tests/timezone_getRegion_error.phpt b/ext/intl/tests/timezone_getRegion_error.phpt
index 7a9e1e1ca7..28fd73c1a7 100644
--- a/ext/intl/tests/timezone_getRegion_error.phpt
+++ b/ext/intl/tests/timezone_getRegion_error.phpt
@@ -8,27 +8,10 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-var_dump(IntlTimeZone::getRegion());
-var_dump(IntlTimeZone::getRegion(array()));
-var_dump(IntlTimeZone::getRegion('Europe/Lisbon', 4));
var_dump(IntlTimeZone::getRegion("foo\x81"));
var_dump(IntlTimeZone::getRegion("foo"));
+?>
--EXPECTF--
-Warning: IntlTimeZone::getRegion() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getRegion() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d
-bool(false)
-
-Warning: IntlTimeZone::getRegion() expects exactly 1 parameter, 2 given in %s on line %d
-
-Warning: IntlTimeZone::getRegion(): intltz_get_region: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlTimeZone::getRegion(): intltz_get_region: could not convert time zone id to UTF-16 in %s on line %d
bool(false)
diff --git a/ext/intl/tests/timezone_getTZDataVersion_error.phpt b/ext/intl/tests/timezone_getTZDataVersion_error.phpt
deleted file mode 100644
index eab4573a36..0000000000
--- a/ext/intl/tests/timezone_getTZDataVersion_error.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-IntlTimeZone::getTZDataVersion(): errors
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-var_dump(IntlTimeZone::getTZDataVersion('foo'));
---EXPECTF--
-Warning: IntlTimeZone::getTZDataVersion() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getTZDataVersion(): intltz_get_tz_data_version: bad arguments in %s on line %d
-bool(false)
diff --git a/ext/intl/tests/timezone_getUnknown_error.phpt b/ext/intl/tests/timezone_getUnknown_error.phpt
deleted file mode 100644
index 57773c256b..0000000000
--- a/ext/intl/tests/timezone_getUnknown_error.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-IntlCalendar::getUnknown(): bad arguments
---INI--
-date.timezone=Atlantic/Azores
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-
-$c = new IntlGregorianCalendar(NULL, 'pt_PT');
-
-IntlTimeZone::getUnknown(1);
-
-intltz_get_unknown(1);
---EXPECTF--
-Warning: IntlTimeZone::getUnknown() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::getUnknown(): intltz_get_unknown: bad arguments in %s on line %d
-
-Warning: intltz_get_unknown() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: intltz_get_unknown(): intltz_get_unknown: bad arguments in %s on line %d
diff --git a/ext/intl/tests/timezone_toDateTimeZone_error.phpt b/ext/intl/tests/timezone_toDateTimeZone_error.phpt
index d00e78fd3a..c402dec673 100644
--- a/ext/intl/tests/timezone_toDateTimeZone_error.phpt
+++ b/ext/intl/tests/timezone_toDateTimeZone_error.phpt
@@ -10,29 +10,17 @@ ini_set("intl.error_level", E_WARNING);
$tz = IntlTimeZone::createTimeZone('Etc/Unknown');
-var_dump($tz->toDateTimeZone(''));
try {
var_dump($tz->toDateTimeZone());
} catch (Exception $e) {
var_dump($e->getMessage());
}
-var_dump(intltz_to_date_time_zone());
var_dump(intltz_to_date_time_zone(1));
--EXPECTF--
-Warning: IntlTimeZone::toDateTimeZone() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::toDateTimeZone(): intltz_to_date_time_zone: bad arguments in %s on line %d
-bool(false)
-
Warning: IntlTimeZone::toDateTimeZone(): intltz_to_date_time_zone: DateTimeZone constructor threw exception in %s on line %d
string(66) "DateTimeZone::__construct(): Unknown or bad timezone (Etc/Unknown)"
-Warning: intltz_to_date_time_zone() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: intltz_to_date_time_zone(): intltz_to_date_time_zone: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intltz_to_date_time_zone() must be an instance of IntlTimeZone, int given in %s:%d
Stack trace:
#0 %s(%d): intltz_to_date_time_zone(1)
diff --git a/ext/intl/tests/timezone_useDaylightTime_error.phpt b/ext/intl/tests/timezone_useDaylightTime_error.phpt
index c6ab2eefe5..b872dcb18b 100644
--- a/ext/intl/tests/timezone_useDaylightTime_error.phpt
+++ b/ext/intl/tests/timezone_useDaylightTime_error.phpt
@@ -8,15 +8,9 @@ if (!extension_loaded('intl'))
<?php
ini_set("intl.error_level", E_WARNING);
-$tz = IntlTimeZone::createTimeZone('Europe/Lisbon');
-var_dump($tz->useDaylightTime('foo'));
intltz_use_daylight_time(null);
+?>
--EXPECTF--
-Warning: IntlTimeZone::useDaylightTime() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: IntlTimeZone::useDaylightTime(): intltz_use_daylight_time: bad arguments in %s on line %d
-bool(false)
-
Fatal error: Uncaught TypeError: Argument 1 passed to intltz_use_daylight_time() must be an instance of IntlTimeZone, null given in %s:%d
Stack trace:
#0 %s(%d): intltz_use_daylight_time(NULL)
diff --git a/ext/intl/tests/transliterator_create_from_rule_error.phpt b/ext/intl/tests/transliterator_create_from_rule_error.phpt
index d1549ec1b6..64c57da854 100644
--- a/ext/intl/tests/transliterator_create_from_rule_error.phpt
+++ b/ext/intl/tests/transliterator_create_from_rule_error.phpt
@@ -6,12 +6,6 @@ Transliterator::createFromRules (error)
<?php
ini_set("intl.error_level", E_WARNING);
-$t = Transliterator::createFromRules();
-echo intl_get_error_message(),"\n";
-
-$t = Transliterator::createFromRules("a","b");
-echo intl_get_error_message(),"\n";
-
$t = Transliterator::createFromRules("\x8Fss");
echo intl_get_error_message(),"\n";
@@ -31,16 +25,6 @@ $t = Transliterator::createFromRules($rules);
echo intl_get_error_message(),"\n";
echo "Done.\n";
--EXPECTF--
-Warning: Transliterator::createFromRules() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: Transliterator::createFromRules(): transliterator_create_from_rules: bad arguments in %s on line %d
-transliterator_create_from_rules: bad arguments: U_ILLEGAL_ARGUMENT_ERROR
-
-Warning: Transliterator::createFromRules() expects parameter 2 to be int, string given in %s on line %d
-
-Warning: Transliterator::createFromRules(): transliterator_create_from_rules: bad arguments in %s on line %d
-transliterator_create_from_rules: bad arguments: U_ILLEGAL_ARGUMENT_ERROR
-
Warning: Transliterator::createFromRules(): String conversion of rules to UTF-16 failed in %s on line %d
String conversion of rules to UTF-16 failed: U_INVALID_CHAR_FOUND
diff --git a/ext/intl/tests/transliterator_create_inverse_error.phpt b/ext/intl/tests/transliterator_create_inverse_error.phpt
index 1a1e80ba68..a7fffa62b1 100644
--- a/ext/intl/tests/transliterator_create_inverse_error.phpt
+++ b/ext/intl/tests/transliterator_create_inverse_error.phpt
@@ -7,16 +7,9 @@ Transliterator::createInverse (error)
ini_set("intl.error_level", E_WARNING);
-$tr = Transliterator::create("Katakana-Latin");
-$tr->createInverse(array());
-
-$tr = Transliterator::create("Katakana-Latin");
transliterator_create_inverse("jj");
+?>
--EXPECTF--
-Warning: Transliterator::createInverse() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: Transliterator::createInverse(): transliterator_create_inverse: bad arguments in %s on line %d
-
Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_create_inverse() must be an instance of Transliterator, string given in %s:%d
Stack trace:
#0 %s(%d): transliterator_create_inverse('jj')
diff --git a/ext/intl/tests/transliterator_get_error_code_error.phpt b/ext/intl/tests/transliterator_get_error_code_error.phpt
index e700d2b172..813c8c480e 100644
--- a/ext/intl/tests/transliterator_get_error_code_error.phpt
+++ b/ext/intl/tests/transliterator_get_error_code_error.phpt
@@ -5,21 +5,9 @@ Transliterator::getErrorCode (error)
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
-$t = Transliterator::create("[\p{Bidi_Mirrored}] Hex");
-echo transliterator_get_error_code(), "\n";
-echo $t->getErrorCode(null), "\n";
echo transliterator_get_error_code(array()), "\n";
+?>
--EXPECTF--
-Warning: transliterator_get_error_code() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: transliterator_get_error_code(): transliterator_get_error_code: unable to parse input params in %s on line %d
-
-
-Warning: Transliterator::getErrorCode() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: Transliterator::getErrorCode(): transliterator_get_error_code: unable to parse input params in %s on line %d
-
-
Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_get_error_code() must be an instance of Transliterator, array given in %s:%d
Stack trace:
#0 %s(%d): transliterator_get_error_code(Array)
diff --git a/ext/intl/tests/transliterator_get_error_message_error.phpt b/ext/intl/tests/transliterator_get_error_message_error.phpt
index ec8282447a..7bcc7df169 100644
--- a/ext/intl/tests/transliterator_get_error_message_error.phpt
+++ b/ext/intl/tests/transliterator_get_error_message_error.phpt
@@ -5,21 +5,9 @@ Transliterator::getErrorMessage (error)
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
-$t = Transliterator::create("[\p{Bidi_Mirrored}] Hex");
-echo transliterator_get_error_message(), "\n";
-echo $t->getErrorMessage(null), "\n";
echo transliterator_get_error_message(array()), "\n";
+?>
--EXPECTF--
-Warning: transliterator_get_error_message() expects exactly 1 parameter, 0 given in %s on line %d
-
-Warning: transliterator_get_error_message(): transliterator_get_error_message: unable to parse input params in %s on line %d
-
-
-Warning: Transliterator::getErrorMessage() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: Transliterator::getErrorMessage(): transliterator_get_error_message: unable to parse input params in %s on line %d
-
-
Fatal error: Uncaught TypeError: Argument 1 passed to transliterator_get_error_message() must be an instance of Transliterator, array given in %s:%d
Stack trace:
#0 %s(%d): transliterator_get_error_message(Array)
diff --git a/ext/intl/tests/transliterator_list_ids_error.phpt b/ext/intl/tests/transliterator_list_ids_error.phpt
deleted file mode 100644
index fa651387f1..0000000000
--- a/ext/intl/tests/transliterator_list_ids_error.phpt
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--
-Transliterator::listIDs (error)
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
---FILE--
-<?php
-
-ini_set("intl.error_level", E_WARNING);
-var_dump(transliterator_list_ids(array()));
-
-echo "Done.\n";
---EXPECTF--
-Warning: transliterator_list_ids() expects exactly 0 parameters, 1 given in %s on line %d
-
-Warning: transliterator_list_ids(): transliterator_list_ids: bad arguments in %s on line %d
-bool(false)
-Done.
diff --git a/ext/intl/tests/transliterator_transliterate_error.phpt b/ext/intl/tests/transliterator_transliterate_error.phpt
index cdddcfb87b..da9a887455 100644
--- a/ext/intl/tests/transliterator_transliterate_error.phpt
+++ b/ext/intl/tests/transliterator_transliterate_error.phpt
@@ -10,51 +10,19 @@ ini_set("intl.error_level", E_WARNING);
$tr = Transliterator::create("latin");
//Arguments
-var_dump(transliterator_transliterate());
-var_dump(transliterator_transliterate($tr,array()));
var_dump(transliterator_transliterate($tr,"str",7));
var_dump(transliterator_transliterate($tr,"str",7,6));
-var_dump(transliterator_transliterate($tr,"str",2,-1,"extra"));
-
-//Arguments
-var_dump($tr->transliterate());
-var_dump($tr->transliterate(array()));
//bad UTF-8
transliterator_transliterate($tr, "\x80\x03");
echo "Done.\n";
--EXPECTF--
-Warning: transliterator_transliterate() expects at least 2 parameters, 0 given in %s on line %d
-
-Warning: transliterator_transliterate(): transliterator_transliterate: bad arguments in %s on line %d
-bool(false)
-
-Warning: transliterator_transliterate() expects parameter 2 to be string, array given in %s on line %d
-
-Warning: transliterator_transliterate(): transliterator_transliterate: bad arguments in %s on line %d
-bool(false)
-
Warning: transliterator_transliterate(): transliterator_transliterate: Neither "start" nor the "end" arguments can exceed the number of UTF-16 code units (in this case, 3) in %s on line %d
bool(false)
Warning: transliterator_transliterate(): transliterator_transliterate: "start" argument should be non-negative and not bigger than "end" (if defined) in %s on line %d
bool(false)
-Warning: transliterator_transliterate() expects at most 4 parameters, 5 given in %s on line %d
-
-Warning: transliterator_transliterate(): transliterator_transliterate: bad arguments in %s on line %d
-bool(false)
-
-Warning: Transliterator::transliterate() expects at least 1 parameter, 0 given in %s on line %d
-
-Warning: Transliterator::transliterate(): transliterator_transliterate: bad arguments in %s on line %d
-bool(false)
-
-Warning: Transliterator::transliterate() expects parameter 1 to be string, array given in %s on line %d
-
-Warning: Transliterator::transliterate(): transliterator_transliterate: bad arguments in %s on line %d
-bool(false)
-
Warning: transliterator_transliterate(): String conversion of string to UTF-16 failed in %s on line %d
Done.
diff --git a/ext/intl/tests/uconverter_getAvailable_wrongparam_001.phpt b/ext/intl/tests/uconverter_getAvailable_wrongparam_001.phpt
deleted file mode 100644
index 4e381289b3..0000000000
--- a/ext/intl/tests/uconverter_getAvailable_wrongparam_001.phpt
+++ /dev/null
@@ -1,8 +0,0 @@
---TEST--
-Check the function UConverter::getAvailable with parameter wrong
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
---FILE--
-<?php UConverter::getAvailable("This is an ascii string"); ?>
---EXPECTF--
-Warning: UConverter::getAvailable() expects exactly 0 parameters, 1 given in %s on line %d