Skip to content

Commit cc05652

Browse files
Fix test
1 parent c078851 commit cc05652

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Tests/Store/DoctrineDbalStoreTest.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)