tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php 1 location
|
@@ 911-920 (lines=10) @@
|
908 |
|
self::assertNotContains('DATABASE()', $sql); |
909 |
|
} |
910 |
|
|
911 |
|
public function testGetDefaultValueDeclarationSQLEscaped() |
912 |
|
{ |
913 |
|
// string must be escaped |
914 |
|
$field = [ |
915 |
|
'type' => 'string', |
916 |
|
'default' => 'Foo\\Bar' |
917 |
|
]; |
918 |
|
|
919 |
|
self::assertSame(" DEFAULT 'Foo\\\\Bar'", $this->_platform->getDefaultValueDeclarationSQL($field)); |
920 |
|
} |
921 |
|
} |
922 |
|
|
tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php 1 location
|
@@ 923-932 (lines=10) @@
|
920 |
|
); |
921 |
|
} |
922 |
|
|
923 |
|
public function testGetDefaultValueDeclarationSQLEscaped() |
924 |
|
{ |
925 |
|
// string must be escaped |
926 |
|
$field = [ |
927 |
|
'type' => 'string', |
928 |
|
'default' => 'Foo\\Bar' |
929 |
|
]; |
930 |
|
|
931 |
|
self::assertSame(" DEFAULT 'Foo\\\\Bar'", $this->_platform->getDefaultValueDeclarationSQL($field)); |
932 |
|
} |
933 |
|
} |
934 |
|
|
tests/Doctrine/Tests/DBAL/Platforms/SqlitePlatformTest.php 1 location
|
@@ 752-761 (lines=10) @@
|
749 |
|
self::assertContains("'Foo''Bar\\'", $this->_platform->getListTableForeignKeysSQL("Foo'Bar\\"), '', true); |
750 |
|
} |
751 |
|
|
752 |
|
public function testGetDefaultValueDeclarationSQLEscaped() |
753 |
|
{ |
754 |
|
// string must be escaped |
755 |
|
$field = [ |
756 |
|
'type' => 'string', |
757 |
|
'default' => "Foo\\Bar'Baz" |
758 |
|
]; |
759 |
|
|
760 |
|
self::assertSame(" DEFAULT 'Foo\\Bar''Baz'", $this->_platform->getDefaultValueDeclarationSQL($field)); |
761 |
|
} |
762 |
|
} |
763 |
|
|