@@ -26,12 +26,12 @@ public function testShouldNotReconnectIfConnectionIsOK()
26
26
$ connection
27
27
->expects ($ this ->once ())
28
28
->method ('isConnected ' )
29
- ->will ( $ this -> returnValue ( true ) )
29
+ ->willReturn ( true )
30
30
;
31
31
$ connection
32
32
->expects ($ this ->once ())
33
33
->method ('ping ' )
34
- ->will ( $ this -> returnValue ( true ) )
34
+ ->willReturn ( true )
35
35
;
36
36
$ connection
37
37
->expects ($ this ->never ())
@@ -52,7 +52,7 @@ public function testShouldNotReconnectIfConnectionIsOK()
52
52
$ registry
53
53
->expects ($ this ->once ())
54
54
->method ('getConnections ' )
55
- ->will ( $ this -> returnValue ( [$ connection ]) )
55
+ ->willReturn ( [$ connection ])
56
56
;
57
57
58
58
$ extension = new DoctrinePingConnectionExtension ($ registry );
@@ -65,12 +65,12 @@ public function testShouldDoesReconnectIfConnectionFailed()
65
65
$ connection
66
66
->expects ($ this ->once ())
67
67
->method ('isConnected ' )
68
- ->will ( $ this -> returnValue ( true ) )
68
+ ->willReturn ( true )
69
69
;
70
70
$ connection
71
71
->expects ($ this ->once ())
72
72
->method ('ping ' )
73
- ->will ( $ this -> returnValue ( false ) )
73
+ ->willReturn ( false )
74
74
;
75
75
$ connection
76
76
->expects ($ this ->once ())
@@ -97,7 +97,7 @@ public function testShouldDoesReconnectIfConnectionFailed()
97
97
$ registry
98
98
->expects ($ this ->once ())
99
99
->method ('getConnections ' )
100
- ->will ( $ this -> returnValue ( [$ connection ]) )
100
+ ->willReturn ( [$ connection ])
101
101
;
102
102
103
103
$ extension = new DoctrinePingConnectionExtension ($ registry );
@@ -110,7 +110,7 @@ public function testShouldSkipIfConnectionWasNotOpened()
110
110
$ connection1
111
111
->expects ($ this ->once ())
112
112
->method ('isConnected ' )
113
- ->will ( $ this -> returnValue ( false ) )
113
+ ->willReturn ( false )
114
114
;
115
115
$ connection1
116
116
->expects ($ this ->never ())
@@ -122,12 +122,12 @@ public function testShouldSkipIfConnectionWasNotOpened()
122
122
$ connection2
123
123
->expects ($ this ->once ())
124
124
->method ('isConnected ' )
125
- ->will ( $ this -> returnValue ( true ) )
125
+ ->willReturn ( true )
126
126
;
127
127
$ connection2
128
128
->expects ($ this ->once ())
129
129
->method ('ping ' )
130
- ->will ( $ this -> returnValue ( true ) )
130
+ ->willReturn ( true )
131
131
;
132
132
133
133
$ context = $ this ->createContext ();
@@ -140,7 +140,7 @@ public function testShouldSkipIfConnectionWasNotOpened()
140
140
$ registry
141
141
->expects ($ this ->once ())
142
142
->method ('getConnections ' )
143
- ->will ( $ this -> returnValue ( [$ connection1 , $ connection2 ]) )
143
+ ->willReturn ( [$ connection1 , $ connection2 ])
144
144
;
145
145
146
146
$ extension = new DoctrinePingConnectionExtension ($ registry );
0 commit comments