Skip to content

Commit

Permalink
Issue #4501 Modified Charset lookup.
Browse files Browse the repository at this point in the history
  • Loading branch information
CaMer0n committed Dec 6, 2023
1 parent d14d47a commit 2328cb4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions e107_tests/tests/unit/db_verifyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1101,22 +1101,24 @@ public function testRunFix()
{
e107::getPlugin()->install('rss_menu');
}

// Prepare table.
$sql->gen('ALTER TABLE `#rss` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;');
$sql->gen('SHOW CREATE TABLE `#rss`');
$row = $sql->rows();
self::assertStringNotContainsString('CHARSET=utf8mb4', $row[1]['Create Table']);
$sql->gen('SHOW TABLE STATUS WHERE Name = "'.MPREFIX.'rss"');
$row = $sql->fetch('assoc');
self::assertStringNotContainsString('CHARSET=utf8mb4', $row['Collation']);

// Fix table.
$this->dbv->compare('rss');
$this->dbv->compileResults();
$this->dbv->runFix();


// validate table.
$sql->gen('SHOW CREATE TABLE `#rss`');
$row = $sql->rows();
$sql->gen('SHOW TABLE STATUS WHERE Name = "'.MPREFIX.'rss"');
$row = $sql->fetch('assoc');

self::assertStringContainsString('CHARSET=utf8mb4', $row[1]['Create Table']);
self::assertStringContainsString('utf8mb4_general_ci', $row['Collation']);

}

Expand Down

0 comments on commit 2328cb4

Please sign in to comment.