File tree 1 file changed +8
-6
lines changed
src/Symfony/Component/Lock/Tests/Store
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -154,14 +154,15 @@ public function testTableCreationInTransactionNotSupported()
154
154
$ conn ->expects ($ this ->atLeast (2 ))
155
155
->method ('executeStatement ' )
156
156
->willReturnCallback (function ($ sql ) use (&$ series ) {
157
- [$ constraint , $ return ] = array_shift ($ series );
158
- $ constraint ->evaluate ($ sql );
157
+ if ([$ constraint , $ return ] = array_shift ($ series )) {
158
+ $ constraint ->evaluate ($ sql );
159
+ }
159
160
160
161
if ($ return instanceof \Exception) {
161
162
throw $ return ;
162
163
}
163
164
164
- return $ return ;
165
+ return $ return ?? 1 ;
165
166
})
166
167
;
167
168
@@ -195,14 +196,15 @@ public function testCreatesTableOutsideTransaction()
195
196
$ conn ->expects ($ this ->atLeast (3 ))
196
197
->method ('executeStatement ' )
197
198
->willReturnCallback (function ($ sql ) use (&$ series ) {
198
- [$ constraint , $ return ] = array_shift ($ series );
199
- $ constraint ->evaluate ($ sql );
199
+ if ([$ constraint , $ return ] = array_shift ($ series )) {
200
+ $ constraint ->evaluate ($ sql );
201
+ }
200
202
201
203
if ($ return instanceof \Exception) {
202
204
throw $ return ;
203
205
}
204
206
205
- return $ return ;
207
+ return $ return ?? 1 ;
206
208
})
207
209
;
208
210
You can’t perform that action at this time.
0 commit comments