@@ -45,20 +45,16 @@ function it_logs_request_and_response(
4545 $ logger ->info (
4646 "Sending request: \nGET / 1.1 " ,
4747 Argument::that (
48- function (array $ context ) use ($ request ) {
49- return $ context ['request ' ] === $ request ->getWrappedObject ()
50- && is_string ($ context ['uid ' ])
51- ;
48+ function (array $ context ) {
49+ return is_string ($ context ['uid ' ]);
5250 }
5351 )
5452 )->shouldBeCalled ();
5553 $ logger ->info (
5654 "Received response: \n200 OK 1.1 " ,
5755 Argument::that (
58- function (array $ context ) use ($ request , $ response ) {
59- return $ context ['request ' ] === $ request ->getWrappedObject ()
60- && $ context ['response ' ] === $ response ->getWrappedObject ()
61- && is_int ($ context ['milliseconds ' ])
56+ function (array $ context ) {
57+ return is_int ($ context ['milliseconds ' ])
6258 && is_string ($ context ['uid ' ])
6359 ;
6460 }
@@ -81,19 +77,16 @@ function it_logs_exception(LoggerInterface $logger, Formatter $formatter, Reques
8177 $ logger ->info (
8278 "Sending request: \nGET / 1.1 " ,
8379 Argument::that (
84- function (array $ context ) use ($ request ) {
85- return $ context ['request ' ] === $ request ->getWrappedObject ()
86- && is_string ($ context ['uid ' ])
87- ;
80+ function (array $ context ) {
81+ return is_string ($ context ['uid ' ]);
8882 }
8983 )
9084 )->shouldBeCalled ();
9185 $ logger ->error (
9286 "Error: \nCannot connect \nwhen sending request: \nGET / 1.1 " ,
9387 Argument::that (
94- function (array $ context ) use ($ request , $ exception ) {
95- return $ context ['request ' ] === $ request ->getWrappedObject ()
96- && $ context ['exception ' ] === $ exception
88+ function (array $ context ) use ($ exception ) {
89+ return $ context ['exception ' ] === $ exception
9790 && is_int ($ context ['milliseconds ' ])
9891 && is_string ($ context ['uid ' ])
9992 ;
@@ -122,20 +115,16 @@ function it_logs_response_within_exception(
122115 $ logger ->info (
123116 "Sending request: \nGET / 1.1 " ,
124117 Argument::that (
125- function (array $ context ) use ($ request ) {
126- return $ context ['request ' ] === $ request ->getWrappedObject ()
127- && is_string ($ context ['uid ' ])
128- ;
118+ function (array $ context ) {
119+ return is_string ($ context ['uid ' ]);
129120 }
130121 )
131122 )->shouldBeCalled ();
132123 $ logger ->error (
133124 "Error: \nForbidden \nwith response: \n403 Forbidden 1.1 " ,
134125 Argument::that (
135- function (array $ context ) use ($ request , $ response , $ exception ) {
136- return $ context ['request ' ] === $ request ->getWrappedObject ()
137- && $ context ['response ' ] === $ response ->getWrappedObject ()
138- && $ context ['exception ' ] === $ exception
126+ function (array $ context ) use ($ exception ) {
127+ return $ context ['exception ' ] === $ exception
139128 && is_int ($ context ['milliseconds ' ])
140129 && is_string ($ context ['uid ' ])
141130 ;
0 commit comments