Add tests for #20262
Pull-request: #20262 Ref: #18204 Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
parent
03ef236b57
commit
fa168ab7a3
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Tests\Engines;
|
||||
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Engines\Innodb;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
|
||||
@ -248,4 +249,49 @@ class InnodbTest extends AbstractTestCase
|
||||
{
|
||||
self::assertSame('Antelope', $this->object->getInnodbFileFormat());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for getInnodbFileFormat on MySQL 8
|
||||
*/
|
||||
public function testGetInnodbFileFormatOnMySQL8(): void
|
||||
{
|
||||
global $dbi;
|
||||
|
||||
$dbi = $this->createStub(DatabaseInterface::class);
|
||||
|
||||
$dbi->method('isMariaDB')->willReturn(false);
|
||||
$dbi->method('getVersion')->willReturn(80000);
|
||||
|
||||
self::assertSame('', $this->object->getInnodbFileFormat());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for getInnodbFileFormat on MySQL 5
|
||||
*/
|
||||
public function testGetInnodbFileFormatOnMySQL5(): void
|
||||
{
|
||||
global $dbi;
|
||||
|
||||
$dbi = $this->createStub(DatabaseInterface::class);
|
||||
|
||||
$dbi->method('isMariaDB')->willReturn(false);
|
||||
$dbi->method('getVersion')->willReturn(50000);
|
||||
|
||||
self::assertSame('', $this->object->getInnodbFileFormat());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for getInnodbFileFormat on MariaDB 10.6
|
||||
*/
|
||||
public function testGetInnodbFileFormatOnMariaDB106(): void
|
||||
{
|
||||
global $dbi;
|
||||
|
||||
$dbi = $this->createStub(DatabaseInterface::class);
|
||||
|
||||
$dbi->method('isMariaDB')->willReturn(true);
|
||||
$dbi->method('getVersion')->willReturn(100600);
|
||||
|
||||
self::assertSame('', $this->object->getInnodbFileFormat());
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user