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>
$this->assertEquals($expected, $select);
}
+ /**
+ * @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