Skip to content

Commit 55182aa

Browse files
committed
fix(tests): pretend mode has been changed in Laravel 10.30.0
1 parent 3543663 commit 55182aa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/Connection/ReturningTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ public function testExecutesNothingOnPretend(): void
2828
$this->assertEquals([], $this->getConnection()->returningStatement('update example set str = ? where str = ? returning str', ['IS7PD2jn', '8lnreu2H']));
2929
});
3030

31-
$this->assertEquals(['update example set str = ? where str = ? returning str'], array_column($queries, 'query'));
31+
// The pretend mode has been changed in Laravel 10.30.0 to include the bindings in the query string
32+
if (version_compare($this->app->version(), '10.30.0', '>=')) {
33+
$this->assertEquals(["update example set str = 'IS7PD2jn' where str = '8lnreu2H' returning str"], array_column($queries, 'query'));
34+
} else {
35+
$this->assertEquals(['update example set str = ? where str = ? returning str'], array_column($queries, 'query'));
36+
}
3237
});
3338

3439
$this->assertEquals(1, $this->getConnection()->selectOne('SELECT COUNT(*) AS count FROM example WHERE str = ?', ['8lnreu2H'])->count);

0 commit comments

Comments
 (0)