@@ -226,14 +226,6 @@ public function testGetMysqlHelpPage(): void
226226 self ::assertSame ('innodb-storage-engine ' , $ this ->object ->getMysqlHelpPage ());
227227 }
228228
229- /**
230- * Test for getInnodbPluginVersion
231- */
232- public function testGetInnodbPluginVersion (): void
233- {
234- self ::assertSame ('1.1.8 ' , $ this ->object ->getInnodbPluginVersion ());
235- }
236-
237229 /**
238230 * Test for supportsFilePerTable
239231 */
@@ -260,7 +252,9 @@ public function testGetInnodbFileFormatOnMySQL8(): void
260252 $ dbi = $ this ->createStub (DatabaseInterface::class);
261253
262254 $ dbi ->method ('isMariaDB ' )->willReturn (false );
255+ $ dbi ->method ('isMySql ' )->willReturn (true );
263256 $ dbi ->method ('getVersion ' )->willReturn (80000 );
257+ $ dbi ->method ('fetchValue ' )->willReturn ('Barracuda ' );
264258
265259 self ::assertSame ('' , $ this ->object ->getInnodbFileFormat ());
266260 }
@@ -275,9 +269,28 @@ public function testGetInnodbFileFormatOnMySQL5(): void
275269 $ dbi = $ this ->createStub (DatabaseInterface::class);
276270
277271 $ dbi ->method ('isMariaDB ' )->willReturn (false );
272+ $ dbi ->method ('isMySql ' )->willReturn (true );
278273 $ dbi ->method ('getVersion ' )->willReturn (50000 );
274+ $ dbi ->method ('fetchValue ' )->willReturn ('Barracuda ' );
279275
280- self ::assertSame ('' , $ this ->object ->getInnodbFileFormat ());
276+ self ::assertSame ('Barracuda ' , $ this ->object ->getInnodbFileFormat ());
277+ }
278+
279+ /**
280+ * Test for getInnodbFileFormat on MySQL 5 with error
281+ */
282+ public function testGetInnodbFileFormatOnMySQL5WithError (): void
283+ {
284+ global $ dbi ;
285+
286+ $ dbi = $ this ->createStub (DatabaseInterface::class);
287+
288+ $ dbi ->method ('isMariaDB ' )->willReturn (false );
289+ $ dbi ->method ('isMySql ' )->willReturn (true );
290+ $ dbi ->method ('getVersion ' )->willReturn (50000 );
291+ $ dbi ->method ('fetchValue ' )->willReturn (false );
292+
293+ self ::assertNull ($ this ->object ->getInnodbFileFormat ());
281294 }
282295
283296 /**
@@ -290,7 +303,9 @@ public function testGetInnodbFileFormatOnMariaDB106(): void
290303 $ dbi = $ this ->createStub (DatabaseInterface::class);
291304
292305 $ dbi ->method ('isMariaDB ' )->willReturn (true );
306+ $ dbi ->method ('isMySql ' )->willReturn (false );
293307 $ dbi ->method ('getVersion ' )->willReturn (100600 );
308+ $ dbi ->method ('fetchValue ' )->willReturn ('Barracuda ' );
294309
295310 self ::assertSame ('' , $ this ->object ->getInnodbFileFormat ());
296311 }
0 commit comments