@@ -57,9 +57,9 @@ public function testSendAlternate()
57
57
public function testSendAllDead ()
58
58
{
59
59
$ t1 = $ this ->createMock (TransportInterface::class);
60
- $ t1 ->expects ($ this ->once ())->method ('send ' )->will ( $ this -> throwException ( new TransportException () ));
60
+ $ t1 ->expects ($ this ->once ())->method ('send ' )->willThrowException ( new TransportException ());
61
61
$ t2 = $ this ->createMock (TransportInterface::class);
62
- $ t2 ->expects ($ this ->once ())->method ('send ' )->will ( $ this -> throwException ( new TransportException () ));
62
+ $ t2 ->expects ($ this ->once ())->method ('send ' )->willThrowException ( new TransportException ());
63
63
$ t = new RoundRobinTransport ([$ t1 , $ t2 ]);
64
64
$ p = new \ReflectionProperty ($ t , 'cursor ' );
65
65
$ p ->setValue ($ t , 0 );
@@ -80,7 +80,7 @@ public function testSendAllDead()
80
80
public function testSendOneDead ()
81
81
{
82
82
$ t1 = $ this ->createMock (TransportInterface::class);
83
- $ t1 ->expects ($ this ->once ())->method ('send ' )->will ( $ this -> throwException ( new TransportException () ));
83
+ $ t1 ->expects ($ this ->once ())->method ('send ' )->willThrowException ( new TransportException ());
84
84
$ t2 = $ this ->createMock (TransportInterface::class);
85
85
$ t2 ->expects ($ this ->exactly (3 ))->method ('send ' );
86
86
$ t = new RoundRobinTransport ([$ t1 , $ t2 ]);
@@ -99,7 +99,7 @@ public function testSendOneDeadAndRecoveryNotWithinRetryPeriod()
99
99
$ t1 = $ this ->createMock (TransportInterface::class);
100
100
$ t1 ->expects ($ this ->exactly (4 ))->method ('send ' );
101
101
$ t2 = $ this ->createMock (TransportInterface::class);
102
- $ t2 ->expects ($ this ->once ())->method ('send ' )->will ( $ this -> throwException ( new TransportException () ));
102
+ $ t2 ->expects ($ this ->once ())->method ('send ' )->willThrowException ( new TransportException ());
103
103
$ t = new RoundRobinTransport ([$ t1 , $ t2 ], 60 );
104
104
$ p = new \ReflectionProperty ($ t , 'cursor ' );
105
105
$ p ->setValue ($ t , 0 );
@@ -148,13 +148,13 @@ public function testFailureDebugInformation()
148
148
$ t1 = $ this ->createMock (TransportInterface::class);
149
149
$ e1 = new TransportException ();
150
150
$ e1 ->appendDebug ('Debug message 1 ' );
151
- $ t1 ->expects ($ this ->once ())->method ('send ' )->will ( $ this -> throwException ( $ e1 ) );
151
+ $ t1 ->expects ($ this ->once ())->method ('send ' )->willThrowException ( $ e1 );
152
152
$ t1 ->expects ($ this ->once ())->method ('__toString ' )->willReturn ('t1 ' );
153
153
154
154
$ t2 = $ this ->createMock (TransportInterface::class);
155
155
$ e2 = new TransportException ();
156
156
$ e2 ->appendDebug ('Debug message 2 ' );
157
- $ t2 ->expects ($ this ->once ())->method ('send ' )->will ( $ this -> throwException ( $ e2 ) );
157
+ $ t2 ->expects ($ this ->once ())->method ('send ' )->willThrowException ( $ e2 );
158
158
$ t2 ->expects ($ this ->once ())->method ('__toString ' )->willReturn ('t2 ' );
159
159
160
160
$ t = new RoundRobinTransport ([$ t1 , $ t2 ]);
0 commit comments