diff --git a/typo3/sysext/core/Tests/Unit/Database/Schema/Parser/ColumnDefinitionAttributesTest.php b/typo3/sysext/core/Tests/Unit/Database/Schema/Parser/ColumnDefinitionAttributesTest.php index 1207ef8248736d7501d2d2a5ca3f73012f1ca557..be41cd0b114a68a42b72f53084a3bc6eed002649 100644 --- a/typo3/sysext/core/Tests/Unit/Database/Schema/Parser/ColumnDefinitionAttributesTest.php +++ b/typo3/sysext/core/Tests/Unit/Database/Schema/Parser/ColumnDefinitionAttributesTest.php @@ -333,21 +333,21 @@ final class ColumnDefinitionAttributesTest extends UnitTestCase 'columnFormat' => 'dynamic', 'storage' => null, ], - // @todo Parsing default values with quoted quotes throws a "Error: Expected ... GOT: 'can" exception, but - // should work. Enable dataset along with the bugfix. - //"DEFAULT 'quoted single-quote \' can be parsed'" => [ - // 'columnAttribute' => "DEFAULT 'quoted single-quote (\') can be parsed'", - // 'allowNull' => true, - // 'hasDefaultValue' => true, - // 'defaultValue' => "quoted single-quote (') is parsed properly", - // 'autoIncrement' => false, - // 'createIndex' => false, - // 'createUniqueIndex' => false, - // 'isPrimaryKey' => false, - // 'comment' => null, - // 'columnFormat' => null, - // 'storage' => null, - //], + // MySQL and MariaDB way to quote ' for a value string is to use double single-quotes "''" instead of + // using some sort of escape sequences, which is covered by the following testcase. + "DEFAULT 'quoted single-quote '' can be parsed'" => [ + 'columnAttribute' => "DEFAULT 'quoted single-quote ('') can be parsed'", + 'allowNull' => true, + 'hasDefaultValue' => true, + 'defaultValue' => "quoted single-quote (') can be parsed", + 'autoIncrement' => false, + 'createIndex' => false, + 'createUniqueIndex' => false, + 'isPrimaryKey' => false, + 'comment' => null, + 'columnFormat' => null, + 'storage' => null, + ], "DEFAULT 'double-quote (\") can be parsed'" => [ 'columnAttribute' => "DEFAULT 'quoted single-quote (\") can be parsed'", 'allowNull' => true,