Unverified Commit 6fa85496 authored by belgattitude's avatar belgattitude Committed by Luís Cobucci

Fixed CS

parent a04d8040
......@@ -17,7 +17,7 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
{
parent::setUp();
if ( ! Type::hasType('point')) {
if (!Type::hasType('point')) {
Type::addType('point', MySqlPointType::class);
}
}
......@@ -376,7 +376,6 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
public function testColumnDefaultsAreValid()
{
$table = new Table("test_column_defaults_are_valid");
$currentTimeStampSql = $this->_sm->getDatabasePlatform()->getCurrentTimestampSQL();
......@@ -461,7 +460,6 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
$platform = $this->_sm->getDatabasePlatform();
$this->_conn->query('DROP TABLE IF EXISTS test_column_defaults_with_create');
// https://dev.mysql.com/doc/refman/5.7/en/string-literals.html
$escapeSequences = [
"\\0", // An ASCII NUL (X'00') character
"\\'", "''", // Single quote
......@@ -475,14 +473,13 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
'\\%', // A percent (%) character
'\\_', // An underscore (_) character
];
$default = implode('+', $escapeSequences);
$sql = "CREATE TABLE test_column_defaults_with_create(
col1 VARCHAR(255) NULL DEFAULT {$platform->quoteStringLiteral($default)}
)";
$this->_conn->query($sql);
$onlineTable = $this->_sm->listTableDetails("test_column_defaults_with_create");
self::assertSame($default, $onlineTable->getColumn('col1')->getDefault());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment