[TASK] Only use one select to calculate page cache timeout
[Packages/TYPO3.CMS.git] / typo3 / sysext / dbal / Tests / Unit / Database / SqlParserTest.php
index 6b0821d..5a4f346 100644 (file)
@@ -1192,6 +1192,18 @@ class SqlParserTest extends AbstractTestCase
         $this->assertEmpty($parseString);
     }
 
+    /**
+     * @test
+     * @see https://forge.typo3.org/issues/38838
+     */
+    public function caseWithBooleanConditionIsSupportedWithinAggregateFunction()
+    {
+        $parseString = 'MIN(CASE WHEN foo < 100 THEN NULL ELSE foo END) AS foo';
+        $result = $this->subject->parseFieldList($parseString);
+        $this->assertInternalType('array', $result);
+        $this->assertEmpty($parseString);
+    }
+
     /**
      * @test
      * @see http://forge.typo3.org/issues/21903