Bug #21887 » 13104_dbal.diff
class.ux_t3lib_sqlparser.php (working copy) | ||
---|---|---|
// TODO: Handle SQL hints in comments according to current DBMS
|
||
return parent::compileFieldList($selectFields, FALSE);
|
||
}
|
||
/**
|
||
* Add slashes function used for compiling queries
|
||
* This method overrides the method from t3lib_sqlparser because
|
||
* the input string is already properly escaped.
|
||
*
|
||
* @param string Input string
|
||
* @return string Output string
|
||
*/
|
||
protected function compileAddslashes($str) {
|
||
return $str;
|
||
}
|
||
|
||
/*************************
|
||
*
|
tests/sqlparser_general_testcase.php (working copy) | ||
---|---|---|
/**
|
||
* @test
|
||
* @see http://bugs.typo3.org/view.php?id=13104
|
||
*/
|
||
public function canGetStringValue() {
|
||
$parseString = '"some owner\\\' string"';
|
||
$parseString = '"some owner\\\'s string"';
|
||
$value = $this->fixture->_callRef('getValue', $parseString);
|
||
$expected = array('some owner\' string', '"');
|
||
$expected = array('some owner\'s string', '"');
|
||
$this->assertEquals($expected, $value);
|
||
}
|
||
/**
|
||
* @test
|
||
* @see http://bugs.typo3.org/view.php?id=13104
|
||
*/
|
||
public function canGetStringValueWithSingleQuote() {
|
||
$parseString = "'some owner\'s string'";
|
||
$value = $this->fixture->_callRef('getValue', $parseString);
|
||
$expected = array('some owner\'s string', "'");
|
||
$this->assertEquals($expected, $value);
|
||
}
|
||
/**
|
||
* @test
|
||
* @see http://bugs.typo3.org/view.php?id=13104
|
||
*/
|
||
public function canGetStringValueWithDoubleQuote() {
|
||
$parseString = '"the \"owner\" is here"';
|
||
$value = $this->fixture->_callRef('getValue', $parseString);
|
||
$expected = array('the "owner" is here', '"');
|
||
$this->assertEquals($expected, $value);
|
||
}
|
||
/**
|
||
* @test
|
||
*/
|
||
public function canGetListOfValues() {
|
||
$parseString = '( 1, 2, 3 ,4)';
|
||
$operator = 'IN';
|
- « Previous
- 1
- 2
- 3
- Next »