File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -159,14 +159,15 @@ public function testTableCreationInTransactionNotSupported()
159159 $ conn ->expects ($ this ->atLeast (2 ))
160160 ->method ('executeStatement ' )
161161 ->willReturnCallback (function ($ sql ) use (&$ series ) {
162- [$ constraint , $ return ] = array_shift ($ series );
163- $ constraint ->evaluate ($ sql );
162+ if ([$ constraint , $ return ] = array_shift ($ series )) {
163+ $ constraint ->evaluate ($ sql );
164+ }
164165
165166 if ($ return instanceof \Exception) {
166167 throw $ return ;
167168 }
168169
169- return $ return ;
170+ return $ return ?? 1 ;
170171 })
171172 ;
172173
@@ -200,14 +201,15 @@ public function testCreatesTableOutsideTransaction()
200201 $ conn ->expects ($ this ->atLeast (3 ))
201202 ->method ('executeStatement ' )
202203 ->willReturnCallback (function ($ sql ) use (&$ series ) {
203- [$ constraint , $ return ] = array_shift ($ series );
204- $ constraint ->evaluate ($ sql );
204+ if ([$ constraint , $ return ] = array_shift ($ series )) {
205+ $ constraint ->evaluate ($ sql );
206+ }
205207
206208 if ($ return instanceof \Exception) {
207209 throw $ return ;
208210 }
209211
210- return $ return ;
212+ return $ return ?? 1 ;
211213 })
212214 ;
213215
You can’t perform that action at this time.
0 commit comments