@@ -51,6 +51,33 @@ public function testIsUUIDSupported(bool $expected, bool $isMariaDb, int $versio
5151 self ::assertSame ($ expected , Compatibility::isUUIDSupported ($ dbiStub ));
5252 }
5353
54+ /**
55+ * @return array[]
56+ * @psalm-return array<string, array{bool, bool, int}>
57+ */
58+ public static function providerForTestIsVectorSupported (): array
59+ {
60+ return [
61+ 'MySQL 8.99.99 ' => [false , false , 89999 ],
62+ 'MySQL 9.0.0 ' => [false , false , 90000 ],
63+ 'MariaDB 11.7.99 ' => [false , true , 110799 ],
64+ 'MariaDB 11.8.0 ' => [true , true , 110800 ],
65+ ];
66+ }
67+
68+ /**
69+ * @dataProvider providerForTestIsVectorSupported
70+ */
71+ public function testIsVectorSupported (bool $ expected , bool $ isMariaDb , int $ version ): void
72+ {
73+ $ dbiStub = $ this ->createStub (DatabaseInterface::class);
74+
75+ $ dbiStub ->method ('isMariaDB ' )->willReturn ($ isMariaDb );
76+ $ dbiStub ->method ('getVersion ' )->willReturn ($ version );
77+
78+ self ::assertSame ($ expected , Compatibility::isVectorSupported ($ dbiStub ));
79+ }
80+
5481 /**
5582 * @return array[]
5683 * @psalm-return array<string, array{bool, bool, int}>
0 commit comments