diff options
author | Aaron Piotrowski <aaron@trowski.com> | 2015-05-16 16:49:14 -0500 |
---|---|---|
committer | Aaron Piotrowski <aaron@trowski.com> | 2015-05-16 16:49:14 -0500 |
commit | 64b167d201e567ec213b5aa37c66536621835331 (patch) | |
tree | 272d6f3951625ef7bc82eba08bad64aef9b883d2 /ext/date | |
parent | d042d0880796cfe99262bb6fa44225e984c63ace (diff) | |
download | php-git-64b167d201e567ec213b5aa37c66536621835331.tar.gz |
Updated tests to reflect exception class changes.
Diffstat (limited to 'ext/date')
8 files changed, 17 insertions, 17 deletions
diff --git a/ext/date/tests/DateTimeZone_construct_error.phpt b/ext/date/tests/DateTimeZone_construct_error.phpt index 6ff900d82f..8c8b14f12c 100644 --- a/ext/date/tests/DateTimeZone_construct_error.phpt +++ b/ext/date/tests/DateTimeZone_construct_error.phpt @@ -17,7 +17,7 @@ $timezone = "GMT"; $extra_arg = 99; try { new DateTimeZone($timezone, $extra_arg); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage(), "\n"; } diff --git a/ext/date/tests/DateTimeZone_construct_variation1.phpt b/ext/date/tests/DateTimeZone_construct_variation1.phpt index 96f5372611..d9625eedc0 100644 --- a/ext/date/tests/DateTimeZone_construct_variation1.phpt +++ b/ext/date/tests/DateTimeZone_construct_variation1.phpt @@ -97,7 +97,7 @@ foreach($inputs as $variation =>$timezone) { echo "\n-- $variation --\n"; try { var_dump( new DateTimezone($timezone) ); - } catch (BaseException $e) { + } catch (Throwable $e) { $msg = $e->getMessage(); echo "FAILED: " . $msg . "\n"; } diff --git a/ext/date/tests/DateTime_construct_error.phpt b/ext/date/tests/DateTime_construct_error.phpt index de42566961..d0a453fd9d 100644 --- a/ext/date/tests/DateTime_construct_error.phpt +++ b/ext/date/tests/DateTime_construct_error.phpt @@ -18,7 +18,7 @@ $timezone = timezone_open("GMT"); $extra_arg = 99; try { var_dump( new DateTime($time, $timezone, $extra_arg) ); -} catch (TypeException $e) { +} catch (TypeError $e) { echo $e->getMessage(), "\n"; } diff --git a/ext/date/tests/DateTime_construct_variation1.phpt b/ext/date/tests/DateTime_construct_variation1.phpt index 6f149ae207..8ff7f7e89c 100644 --- a/ext/date/tests/DateTime_construct_variation1.phpt +++ b/ext/date/tests/DateTime_construct_variation1.phpt @@ -102,14 +102,14 @@ foreach($inputs as $variation =>$time) { try { var_dump( new DateTime($time) ); - } catch (BaseException $e) { + } catch (Throwable $e) { $msg = $e->getMessage(); echo "FAILED: " . $msg . "\n"; } try { var_dump( new DateTime($time, $timezone) ); - } catch (BaseException$e) { + } catch (Throwable $e) { $msg = $e->getMessage(); echo "FAILED: " . $msg . "\n"; } diff --git a/ext/date/tests/DateTime_construct_variation2.phpt b/ext/date/tests/DateTime_construct_variation2.phpt index d134d8f6cf..e75e14d8e3 100644 --- a/ext/date/tests/DateTime_construct_variation2.phpt +++ b/ext/date/tests/DateTime_construct_variation2.phpt @@ -102,7 +102,7 @@ foreach($inputs as $variation =>$timezone) { try { var_dump( new DateTime($time, $timezone) ); - } catch (BaseException $e) { + } catch (Throwable $e) { $msg = $e->getMessage(); echo "FAILED: " . $msg . "\n"; } diff --git a/ext/date/tests/timezone_offset_get_error.phpt b/ext/date/tests/timezone_offset_get_error.phpt index 653625dd34..7ce1ade30a 100644 --- a/ext/date/tests/timezone_offset_get_error.phpt +++ b/ext/date/tests/timezone_offset_get_error.phpt @@ -26,7 +26,7 @@ echo "*** Testing timezone_offset_get() : error conditions ***\n"; echo "\n-- Testing timezone_offset_get() function with zero arguments --\n"; try { var_dump( timezone_offset_get() ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } @@ -34,7 +34,7 @@ try { echo "\n-- Testing timezone_offset_get() function with less than expected no. of arguments --\n"; try { var_dump( timezone_offset_get($tz) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } @@ -43,7 +43,7 @@ echo "\n-- Testing timezone_offset_get() function with more than expected no. of $extra_arg = 99; try { var_dump( timezone_offset_get($tz, $date, $extra_arg) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } @@ -52,21 +52,21 @@ echo "\n-- Testing timezone_offset_get() function with an invalid values for \$o $invalid_obj = new stdClass(); try { var_dump( timezone_offset_get($invalid_obj, $date) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } $invalid_obj = 10; try { var_dump( timezone_offset_get($invalid_obj, $date) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } $invalid_obj = null; try { var_dump( timezone_offset_get($invalid_obj, $date) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } @@ -75,21 +75,21 @@ echo "\n-- Testing timezone_offset_get() function with an invalid values for \$d $invalid_obj = new stdClass(); try { var_dump( timezone_offset_get($tz, $invalid_obj) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } $invalid_obj = 10; try { var_dump( timezone_offset_get($tz, $invalid_obj) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } $invalid_obj = null; try { var_dump( timezone_offset_get($tz, $invalid_obj) ); -} catch (EngineException $ex) { +} catch (Error $ex) { var_dump($ex->getMessage()); echo "\n"; } diff --git a/ext/date/tests/timezone_offset_get_variation1.phpt b/ext/date/tests/timezone_offset_get_variation1.phpt index d2cfeedaaf..edeeb7fea7 100644 --- a/ext/date/tests/timezone_offset_get_variation1.phpt +++ b/ext/date/tests/timezone_offset_get_variation1.phpt @@ -109,7 +109,7 @@ foreach($inputs as $variation =>$object) { echo "\n-- $variation --\n"; try { var_dump( timezone_offset_get($object, $datetime) ); - } catch (EngineException $ex) { + } catch (Error $ex) { echo $ex->getMessage()."\n"; } }; diff --git a/ext/date/tests/timezone_offset_get_variation2.phpt b/ext/date/tests/timezone_offset_get_variation2.phpt index 8191e18ee7..2d007d5e70 100644 --- a/ext/date/tests/timezone_offset_get_variation2.phpt +++ b/ext/date/tests/timezone_offset_get_variation2.phpt @@ -109,7 +109,7 @@ foreach($inputs as $variation =>$datetime) { echo "\n-- $variation --\n"; try { var_dump( timezone_offset_get($object, $datetime) ); - } catch (EngineException $ex) { + } catch (Error $ex) { echo $ex->getMessage()."\n"; } }; |