mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 07:29:51 +00:00
Add test case for trailing hyphen in column name
This commit is contained in:
parent
9f9ae8a9fd
commit
11dfe0b40c
1 changed files with 12 additions and 0 deletions
|
@ -197,6 +197,18 @@ class DboSourceTest extends CakeTestCase {
|
||||||
$this->assertEquals(' WHERE 1 = 1', $result, 'nested empty conditions failed');
|
$this->assertEquals(' WHERE 1 = 1', $result, 'nested empty conditions failed');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* test that PostgreSQL json operators can be used.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testColumnHyphenOperator() {
|
||||||
|
$result = $this->testDb->conditions(array('Foo.bar->>\'fieldName\'' => 42));
|
||||||
|
echo "Result is: ";
|
||||||
|
echo $result;
|
||||||
|
$this->assertEquals(' WHERE `Foo`.`bar`->>\'fieldName\' = 42', $result, 'pgsql json operator failed');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test that order() will accept objects made from DboSource::expression
|
* test that order() will accept objects made from DboSource::expression
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue