1--TEST-- 2IntlCalendar::isEquivalentTo(): bad arguments 3--INI-- 4date.timezone=Atlantic/Azores 5--EXTENSIONS-- 6intl 7--FILE-- 8<?php 9ini_set("intl.error_level", E_WARNING); 10 11$c = new IntlGregorianCalendar(NULL, 'pt_PT'); 12 13function eh($errno, $errstr) { 14echo "error: $errno, $errstr\n"; 15} 16set_error_handler('eh'); 17 18try { 19 var_dump($c->isEquivalentTo(0)); 20} catch (Error $ex) { 21 echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; 22} 23try { 24 var_dump($c->isEquivalentTo($c, 1)); 25} catch (Error $ex) { 26 echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; 27} 28try { 29 var_dump($c->isEquivalentTo(1)); 30} catch (Error $ex) { 31 echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; 32} 33 34try { 35 var_dump(intlcal_is_equivalent_to($c)); 36} catch (Error $ex) { 37 echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; 38} 39try { 40 var_dump(intlcal_is_equivalent_to($c, 1)); 41} catch (Error $ex) { 42 echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; 43} 44try { 45 var_dump(intlcal_is_equivalent_to(1, $c)); 46} catch (Error $ex) { 47 echo "error: " . $ex->getCode() . ", " . $ex->getMessage() . "\n\n"; 48} 49?> 50--EXPECT-- 51error: 0, IntlCalendar::isEquivalentTo(): Argument #1 ($other) must be of type IntlCalendar, int given 52 53error: 0, IntlCalendar::isEquivalentTo() expects exactly 1 argument, 2 given 54 55error: 0, IntlCalendar::isEquivalentTo(): Argument #1 ($other) must be of type IntlCalendar, int given 56 57error: 0, intlcal_is_equivalent_to() expects exactly 2 arguments, 1 given 58 59error: 0, intlcal_is_equivalent_to(): Argument #2 ($other) must be of type IntlCalendar, int given 60 61error: 0, intlcal_is_equivalent_to(): Argument #1 ($calendar) must be of type IntlCalendar, int given 62