@@ -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 ->setAccessible (true );
@@ -81,7 +81,7 @@ public function testSendAllDead()
81
81
public function testSendOneDead ()
82
82
{
83
83
$ t1 = $ this ->createMock (TransportInterface::class);
84
- $ t1 ->expects ($ this ->once ())->method ('send ' )->will ( $ this -> throwException ( new TransportException () ));
84
+ $ t1 ->expects ($ this ->once ())->method ('send ' )->willThrowException ( new TransportException ());
85
85
$ t2 = $ this ->createMock (TransportInterface::class);
86
86
$ t2 ->expects ($ this ->exactly (3 ))->method ('send ' );
87
87
$ t = new RoundRobinTransport ([$ t1 , $ t2 ]);
@@ -101,7 +101,7 @@ public function testSendOneDeadAndRecoveryNotWithinRetryPeriod()
101
101
$ t1 = $ this ->createMock (TransportInterface::class);
102
102
$ t1 ->expects ($ this ->exactly (4 ))->method ('send ' );
103
103
$ t2 = $ this ->createMock (TransportInterface::class);
104
- $ t2 ->expects ($ this ->once ())->method ('send ' )->will ( $ this -> throwException ( new TransportException () ));
104
+ $ t2 ->expects ($ this ->once ())->method ('send ' )->willThrowException ( new TransportException ());
105
105
$ t = new RoundRobinTransport ([$ t1 , $ t2 ], 60 );
106
106
$ p = new \ReflectionProperty ($ t , 'cursor ' );
107
107
$ p ->setAccessible (true );
@@ -152,13 +152,13 @@ public function testFailureDebugInformation()
152
152
$ t1 = $ this ->createMock (TransportInterface::class);
153
153
$ e1 = new TransportException ();
154
154
$ e1 ->appendDebug ('Debug message 1 ' );
155
- $ t1 ->expects ($ this ->once ())->method ('send ' )->will ( $ this -> throwException ( $ e1 ) );
155
+ $ t1 ->expects ($ this ->once ())->method ('send ' )->willThrowException ( $ e1 );
156
156
$ t1 ->expects ($ this ->once ())->method ('__toString ' )->willReturn ('t1 ' );
157
157
158
158
$ t2 = $ this ->createMock (TransportInterface::class);
159
159
$ e2 = new TransportException ();
160
160
$ e2 ->appendDebug ('Debug message 2 ' );
161
- $ t2 ->expects ($ this ->once ())->method ('send ' )->will ( $ this -> throwException ( $ e2 ) );
161
+ $ t2 ->expects ($ this ->once ())->method ('send ' )->willThrowException ( $ e2 );
162
162
$ t2 ->expects ($ this ->once ())->method ('__toString ' )->willReturn ('t2 ' );
163
163
164
164
$ t = new RoundRobinTransport ([$ t1 , $ t2 ]);
0 commit comments