@@ -326,7 +326,7 @@ public function testShouldCallPreSendEventExtensionMethodWhenSendToBus()
326
326
$ producer = new Producer ($ driver , $ this ->createRpcFactoryMock (), $ extension );
327
327
328
328
$ extension
329
- ->expects ($ this -> at ( 0 ))
329
+ ->expects (self :: once ( ))
330
330
->method ('onPreSendEvent ' )
331
331
->willReturnCallback (function (PreSend $ context ) use ($ message , $ producer , $ driver ) {
332
332
$ this ->assertSame ($ message , $ context ->getMessage ());
@@ -364,7 +364,7 @@ public function testShouldCallPreSendEventExtensionMethodWhenSendToApplicationRo
364
364
$ producer = new Producer ($ driver , $ this ->createRpcFactoryMock (), $ extension );
365
365
366
366
$ extension
367
- ->expects ($ this -> at ( 0 ))
367
+ ->expects (self :: once ( ))
368
368
->method ('onPreSendEvent ' )
369
369
->willReturnCallback (function (PreSend $ context ) use ($ message , $ producer , $ driver ) {
370
370
$ this ->assertSame ($ message , $ context ->getMessage ());
@@ -402,7 +402,7 @@ public function testShouldCallPreDriverSendExtensionMethodWhenSendToMessageBus()
402
402
$ producer = new Producer ($ driver , $ this ->createRpcFactoryMock (), $ extension );
403
403
404
404
$ extension
405
- ->expects ($ this -> at ( 0 ))
405
+ ->expects (self :: once ( ))
406
406
->method ('onDriverPreSend ' )
407
407
->willReturnCallback (function (DriverPreSend $ context ) use ($ message , $ producer , $ driver ) {
408
408
$ this ->assertSame ($ message , $ context ->getMessage ());
@@ -434,7 +434,7 @@ public function testShouldCallPreDriverSendExtensionMethodWhenSendToApplicationR
434
434
$ producer = new Producer ($ driver , $ this ->createRpcFactoryMock (), $ extension );
435
435
436
436
$ extension
437
- ->expects ($ this -> at ( 0 ))
437
+ ->expects (self :: once ( ))
438
438
->method ('onDriverPreSend ' )
439
439
->willReturnCallback (function (DriverPreSend $ context ) use ($ message , $ producer , $ driver ) {
440
440
$ this ->assertSame ($ message , $ context ->getMessage ());
@@ -466,7 +466,7 @@ public function testShouldCallPostSendExtensionMethodWhenSendToMessageBus()
466
466
$ producer = new Producer ($ driver , $ this ->createRpcFactoryMock (), $ extension );
467
467
468
468
$ extension
469
- ->expects ($ this -> at ( 0 ))
469
+ ->expects (self :: once ( ))
470
470
->method ('onPostSend ' )
471
471
->willReturnCallback (function (PostSend $ context ) use ($ message , $ producer , $ driver ) {
472
472
$ this ->assertSame ($ message , $ context ->getMessage ());
@@ -498,7 +498,7 @@ public function testShouldCallPostSendExtensionMethodWhenSendToApplicationRouter
498
498
$ producer = new Producer ($ driver , $ this ->createRpcFactoryMock (), $ extension );
499
499
500
500
$ extension
501
- ->expects ($ this -> at ( 0 ))
501
+ ->expects (self :: once ( ))
502
502
->method ('onDriverPreSend ' )
503
503
->willReturnCallback (function (PostSend $ context ) use ($ message , $ producer , $ driver ) {
504
504
$ this ->assertSame ($ message , $ context ->getMessage ());
0 commit comments