[BUGFIX] SQL parser does not support string as join condition
[Packages/TYPO3.CMS.git] / typo3 / sysext / dbal / Tests / Unit / Database / SqlParserTest.php
index d2aa287..af33f98 100644 (file)
@@ -414,6 +414,18 @@ class SqlParserTest extends AbstractTestCase {
                $this->assertEquals($expected, $this->cleanSql($result));
        }
 
+       /**
+        * @test
+        * @see http://forge.typo3.org/issues/67385
+        */
+       public function canParseMultiJoinConditionsWithStrings() {
+               $sql = 'SELECT * FROM sys_file_processedfile LEFT JOIN sys_registry ON entry_key = sys_file_processedfile.uid AND entry_namespace = \'ProcessedFileChecksumUpdate\'';
+
+               $result = $this->subject->debug_testSQL($sql);
+               $expected = 'SELECT * FROM sys_file_processedfile LEFT JOIN sys_registry ON entry_key=sys_file_processedfile.uid AND entry_namespace=\'ProcessedFileChecksumUpdate\'';
+               $this->assertEquals($expected, $this->cleanSql($result));
+       }
+
        /**
         * @test
         * @see http://forge.typo3.org/issues/22501