$this->assertSame($description,$comment,'The comment matches the schema description.');
}
/**
* {@inheritdoc}
*/
protectedfunctionassertCollation():void{
// Make sure that varchar fields have the correct collations.
$columns=$this->connection->query('SHOW FULL COLUMNS FROM {test_table}');
foreach($columnsas$column){
if($column->Field=='test_field_string'){
$string_check=$column->Collation;
}
if($column->Field=='test_field_string_ascii'){
$string_ascii_check=$column->Collation;
}
}
$this->assertMatchesRegularExpression('#^(utf8mb4_general_ci|utf8mb4_0900_ai_ci)$#',$string_check,'test_field_string should have a utf8mb4_general_ci or a utf8mb4_0900_ai_ci collation, but it has not.');
$this->assertSame('ascii_general_ci',$string_ascii_check,'test_field_string_ascii should have a ascii_general_ci collation, but it has not.');
}
/**
* Tests that indexes on string fields are limited to 191 characters on MySQL.
*
@@ -143,4 +172,60 @@ public function testIndexLength(): void {
$this->assertEquals($column_count,$test_count,'Number of tests matches expected value.');