@@ -42,7 +42,7 @@ public function queryShouldCreateUdpRequest()
4242 ->will ($ this ->returnNewConnectionMock (false ));
4343
4444 $ query = new Query ('igor.io ' , Message::TYPE_A , Message::CLASS_IN , 1345656451 );
45- $ this ->executor ->query ('8.8.8.8:53 ' , $ query, function () {}, function () {} );
45+ $ this ->executor ->query ('8.8.8.8:53 ' , $ query );
4646 }
4747
4848 /** @test */
@@ -62,7 +62,7 @@ public function resolveShouldCreateTcpRequestIfRequestIsLargerThan512Bytes()
6262 ->will ($ this ->returnNewConnectionMock (false ));
6363
6464 $ query = new Query (str_repeat ('a ' , 512 ).'.igor.io ' , Message::TYPE_A , Message::CLASS_IN , 1345656451 );
65- $ this ->executor ->query ('8.8.8.8:53 ' , $ query, function () {}, function () {} );
65+ $ this ->executor ->query ('8.8.8.8:53 ' , $ query );
6666 }
6767
6868 /** @test */
@@ -160,7 +160,7 @@ public function resolveShouldRetryWithTcpIfResponseIsTruncated()
160160 ->will ($ this ->returnNewConnectionMock ());
161161
162162 $ query = new Query ('igor.io ' , Message::TYPE_A , Message::CLASS_IN , 1345656451 );
163- $ this ->executor ->query ('8.8.8.8:53 ' , $ query, function () {}, function () {} );
163+ $ this ->executor ->query ('8.8.8.8:53 ' , $ query );
164164 }
165165
166166 /** @test */
@@ -191,7 +191,7 @@ public function resolveShouldRetryWithTcpIfUdpThrows()
191191 ->will ($ this ->returnNewConnectionMock ());
192192
193193 $ query = new Query ('igor.io ' , Message::TYPE_A , Message::CLASS_IN , 1345656451 );
194- $ this ->executor ->query ('8.8.8.8:53 ' , $ query, function () {}, function () {} );
194+ $ this ->executor ->query ('8.8.8.8:53 ' , $ query );
195195 }
196196
197197 /** @test */
@@ -221,7 +221,7 @@ public function resolveShouldFailIfBothUdpAndTcpThrow()
221221 ->will ($ this ->throwException (new \Exception ()));
222222
223223 $ query = new Query ('igor.io ' , Message::TYPE_A , Message::CLASS_IN , 1345656451 );
224- $ promise = $ this ->executor ->query ('8.8.8.8:53 ' , $ query, function () {}, function () {} );
224+ $ promise = $ this ->executor ->query ('8.8.8.8:53 ' , $ query );
225225
226226 $ mock = $ this ->createCallableMock ();
227227 $ mock
@@ -303,7 +303,7 @@ public function resolveShouldCancelTimerWhenFullResponseIsReceived()
303303 ->with ($ timer );
304304
305305 $ query = new Query ('igor.io ' , Message::TYPE_A , Message::CLASS_IN , 1345656451 );
306- $ this ->executor ->query ('8.8.8.8:53 ' , $ query, function () {}, function () {} );
306+ $ this ->executor ->query ('8.8.8.8:53 ' , $ query );
307307 }
308308
309309 /** @test */
@@ -351,7 +351,8 @@ public function resolveShouldCloseConnectionOnTimeout()
351351 private function returnStandardResponse ()
352352 {
353353 $ that = $ this ;
354- $ callback = function ($ data , $ response ) use ($ that ) {
354+ $ callback = function ($ data ) use ($ that ) {
355+ $ response = new Message ();
355356 $ that ->convertMessageToStandardResponse ($ response );
356357 return $ response ;
357358 };
0 commit comments