File tree 1 file changed +15
-0
lines changed
tests/Integration/Database/MySql
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ protected function setUp(): void
38
38
{
39
39
parent ::setUp ();
40
40
41
+ $ this ->checkMySqlVersion ();
42
+
41
43
DB ::table ('users ' )->insert ([
42
44
['name ' => Str::random ()],
43
45
['name ' => Str::random ()],
@@ -50,6 +52,19 @@ protected function setUp(): void
50
52
]);
51
53
}
52
54
55
+ protected function checkMySqlVersion ()
56
+ {
57
+ $ mySqlVersion = DB ::select ('select version() ' )[0 ]->{'version() ' } ?? '' ;
58
+
59
+ if (strpos ($ mySqlVersion , 'Maria ' ) !== false ) {
60
+ $ this ->markTestSkipped ('Lateral joins are not supported on MariaDB ' .__CLASS__ );
61
+ } elseif ((float ) $ mySqlVersion < '8.0.14 ' ) {
62
+ $ this ->markTestSkipped ('Lateral joins are not supported on MySQL < 8.0.14 ' .__CLASS__ );
63
+
64
+ }
65
+ }
66
+
67
+
53
68
public function testJoinLateral ()
54
69
{
55
70
$ subquery = DB ::table ('posts ' )
You can’t perform that action at this time.
0 commit comments