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/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 |
|
|
tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php 1 location
|
@@ 980-989 (lines=10) @@
|
| 977 |
|
); |
| 978 |
|
} |
| 979 |
|
|
| 980 |
|
public function testGetDefaultValueDeclarationSQLEscaped() |
| 981 |
|
{ |
| 982 |
|
// string must be escaped |
| 983 |
|
$field = [ |
| 984 |
|
'type' => 'string', |
| 985 |
|
'default' => 'Foo\\Bar' |
| 986 |
|
]; |
| 987 |
|
|
| 988 |
|
self::assertSame(" DEFAULT 'Foo\\\\Bar'", $this->_platform->getDefaultValueDeclarationSQL($field)); |
| 989 |
|
} |
| 990 |
|
} |
| 991 |
|
|