Skip to content

Commit

Permalink
Register default callbacks in PHPT tests
Browse files Browse the repository at this point in the history
  • Loading branch information
imjoehaines committed Jan 26, 2021
1 parent 0fc949f commit 4468e96
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 10 deletions.
6 changes: 5 additions & 1 deletion tests/phpt/_prelude.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@

$guzzle = new FakeGuzzle();

return new Client(
$client = new Client(
$config,
null,
$guzzle
);

$client->registerDefaultCallbacks();

return $client;
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $handler->exceptionHandler(new LogicException('terrible things'));
--EXPECTF--
array(1) {
[0]=>
object(Exception)#15 (7) {
object(Exception)#%d (7) {
["message":protected]=>
string(10) "bad things"
["string":"Exception":private]=>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ throw new RuntimeException('abc xyz');
var_dump('I should not be reached');
?>
--EXPECTF--
object(RuntimeException)#15 (7) {
object(RuntimeException)#%d (7) {
["message":protected]=>
string(7) "abc xyz"
["string":"Exception":private]=>
Expand Down
2 changes: 1 addition & 1 deletion tests/phpt/handler_should_handle_all_throwables.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if (PHP_MAJOR_VERSION < 7) {
}
?>
--EXPECTF--
object(DivisionByZeroError)#15 (7) {
object(DivisionByZeroError)#%d (7) {
["message":protected]=>
string(12) "22 / 0 = ???"
["string":"Error":private]=>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (PHP_MAJOR_VERSION < 7) {
}
?>
--EXPECTF--
object(DivisionByZeroError)#15 (7) {
object(DivisionByZeroError)#%d (7) {
["message":protected]=>
string(12) "22 / 0 = ???"
["string":"Error":private]=>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ throw new RuntimeException('abc xyz');
var_dump('I should not be reached');
?>
--EXPECTF--
object(RuntimeException)#15 (7) {
object(RuntimeException)#%d (7) {
["message":protected]=>
string(7) "abc xyz"
["string":"Exception":private]=>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ throw new RuntimeException('abc xyz');
var_dump('I should not be reached');
?>
--EXPECTF--
object(RuntimeException)#15 (7) {
object(RuntimeException)#%d (7) {
["message":protected]=>
string(7) "abc xyz"
["string":"Exception":private]=>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (PHP_MAJOR_VERSION < 7) {
}
?>
--EXPECTF--
object(RuntimeException)#15 (7) {
object(RuntimeException)#%d (7) {
["message":protected]=>
string(7) "abc xyz"
["string":"Exception":private]=>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (PHP_MAJOR_VERSION !== 7) {
}
?>
--EXPECTF--
object(ParseError)#15 (7) {
object(ParseError)#%d (7) {
["message":protected]=>
string(28) "syntax error, unexpected '{'"
["string":"Error":private]=>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (PHP_MAJOR_VERSION !== 8) {
}
?>
--EXPECTF--
object(ParseError)#15 (7) {
object(ParseError)#%d (7) {
["message":protected]=>
string(34) "syntax error, unexpected token "}""
["string":"Error":private]=>
Expand Down

0 comments on commit 4468e96

Please sign in to comment.