Fix code style

parent 4851fc05
......@@ -386,7 +386,7 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
case 'text':
case '_varchar':
case 'varchar':
$tableColumn['default'] = $this->fixDefaultValueQuotes($tableColumn['default']);
$tableColumn['default'] = $this->fixDefaultValueQuotes($tableColumn['default']);
$fixed = false;
break;
case 'interval':
......
......@@ -473,7 +473,7 @@ abstract class AbstractMySQLPlatformTestCase extends AbstractPlatformTestCase
"ALTER TABLE mytable ADD PRIMARY KEY (foo)",
), $sql);
}
public function testAlterPrimaryKeyWithNewColumn()
{
$table = new Table("yolo");
......@@ -483,7 +483,7 @@ abstract class AbstractMySQLPlatformTestCase extends AbstractPlatformTestCase
$comparator = new Comparator();
$diffTable = clone $table;
$diffTable->addColumn('pkc2', 'integer');
$diffTable->dropPrimaryKey();
$diffTable->setPrimaryKey(array('pkc1', 'pkc2'));
......@@ -495,7 +495,7 @@ abstract class AbstractMySQLPlatformTestCase extends AbstractPlatformTestCase
'ALTER TABLE yolo ADD PRIMARY KEY (pkc1, pkc2)',
),
$this->_platform->getAlterTableSQL($comparator->diffTable($table, $diffTable))
);
);
}
public function testInitializesDoctrineTypeMappings()
......@@ -911,11 +911,11 @@ abstract class AbstractMySQLPlatformTestCase extends AbstractPlatformTestCase
public function testGetDefaultValueDeclarationSQLEscaped()
{
// string must be escaped
$field = array(
$field = [
'type' => 'string',
'default' => 'Foo\\Bar'
);
];
self::assertEquals(" DEFAULT 'Foo\\\\Bar'", $this->_platform->getDefaultValueDeclarationSQL($field));
self::assertSame(" DEFAULT 'Foo\\\\Bar'", $this->_platform->getDefaultValueDeclarationSQL($field));
}
}
......@@ -980,11 +980,11 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa
public function testGetDefaultValueDeclarationSQLEscaped()
{
// string must be escaped
$field = array(
$field = [
'type' => 'string',
'default' => 'Foo\\Bar'
);
];
self::assertEquals(" DEFAULT 'Foo\\\\Bar'", $this->_platform->getDefaultValueDeclarationSQL($field));
self::assertSame(" DEFAULT 'Foo\\\\Bar'", $this->_platform->getDefaultValueDeclarationSQL($field));
}
}
......@@ -874,15 +874,4 @@ EOD;
{
self::assertContains("'Foo''Bar\\\\'", $this->_platform->getListTableColumnsSQL('foo_table', "Foo'Bar\\"), '', true);
}
public function testGetDefaultValueDeclarationSQLEscaped()
{
// string must be escaped
$field = array(
'type' => 'string',
'default' => 'Foo\\Bar'
);
self::assertEquals(" DEFAULT 'Foo\\\\Bar'", $this->_platform->getDefaultValueDeclarationSQL($field));
}
}
......@@ -748,4 +748,15 @@ class SqlitePlatformTest extends AbstractPlatformTestCase
{
self::assertContains("'Foo''Bar\\'", $this->_platform->getListTableForeignKeysSQL("Foo'Bar\\"), '', true);
}
public function testGetDefaultValueDeclarationSQLEscaped()
{
// string must be escaped
$field = [
'type' => 'string',
'default' => "Foo\\Bar'Baz"
];
self::assertSame(" DEFAULT 'Foo\\Bar''Baz'", $this->_platform->getDefaultValueDeclarationSQL($field));
}
}
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