Added unit test for bug #15253
authorXavier Perseguers <typo3@perseguers.ch>
Sun, 8 Aug 2010 14:43:24 +0000 (14:43 +0000)
committerXavier Perseguers <typo3@perseguers.ch>
Sun, 8 Aug 2010 14:43:24 +0000 (14:43 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/dbal/trunk@36500 735d13b6-9817-0410-8766-e36946ffe9aa

typo3/sysext/dbal/ChangeLog
typo3/sysext/dbal/tests/dbOracleTest.php

index 49babb6..1ec419e 100644 (file)
@@ -1,5 +1,6 @@
 2010-08-08  Xavier Perseguers  <typo3@perseguers.ch>
 
+       * Added unit test for bug #15253: NOT LIKE is not remapped using dbms_lob.instr with Oracle
        * Fixed bug #12535: DAM-related: Element browser crashes as where-clause cannot be parsed
 
 2010-07-27  Xavier Perseguers  <typo3@perseguers.ch>
index 0a2671e..0a7cd4d 100644 (file)
@@ -659,6 +659,28 @@ class dbOracleTest extends BaseTestCase {
 
        /**
         * @test
+        * @see http://bugs.typo3.org/view.php?id=15253
+        */
+       public function notLikeIsRemappedAccordingToFieldType() {
+               $select = $this->cleanSql($GLOBALS['TYPO3_DB']->SELECTquery(
+                       '*',
+                       'tt_content',
+                       'tt_content.bodytext NOT LIKE \'foo%\''
+               ));
+               $expected = 'SELECT * FROM "tt_content" WHERE NOT (dbms_lob.instr("tt_content"."bodytext", \'foo\',1,1) > 0)';
+               $this->assertEquals($expected, $select);
+
+               $select = $this->cleanSql($GLOBALS['TYPO3_DB']->SELECTquery(
+                       '*',
+                       'fe_users',
+                       'fe_users.usergroup NOT LIKE \'2\''
+               ));
+               $expected = 'SELECT * FROM "fe_users" WHERE NOT (instr("fe_users"."usergroup", \'2\',1,1) > 0)';
+               $this->assertEquals($expected, $select);
+       }
+
+       /**
+        * @test
         * @see http://bugs.typo3.org/view.php?id=14479
         */
        public function instrIsUsedForCEOnPages() {