mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Added variation for a field parsing test
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4952 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
9451c58377
commit
e2d9935a26
1 changed files with 6 additions and 2 deletions
|
@ -1475,8 +1475,12 @@ class DboSourceTest extends UnitTestCase {
|
|||
}
|
||||
|
||||
function testFieldParsing() {
|
||||
$result = $this->db->fields($this->model, 'Vendor', "`Vendor`.`id`, COUNT(`Model`.`vendor_id`) as `Vendor`.`count`");
|
||||
$expected = array('`Vendor`.`id`', 'COUNT(`Model`.`vendor_id`) as `Vendor`.`count`');
|
||||
$result = $this->db->fields($this->model, 'Vendor', "Vendor.id, COUNT(Model.vendor_id) AS `Vendor`.`count`");
|
||||
$expected = array('`Vendor`.`id`', 'COUNT(`Model`.`vendor_id`) AS `Vendor`.`count`');
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$result = $this->db->fields($this->model, 'Vendor', "`Vendor`.`id`, COUNT(`Model`.`vendor_id`) AS `Vendor`.`count`");
|
||||
$expected = array('`Vendor`.`id`', 'COUNT(`Model`.`vendor_id`) AS `Vendor`.`count`');
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$result = $this->db->fields($this->model, 'Post', "CONCAT(REPEAT(' ', COUNT(Parent.name) - 1), Node.name) AS name, Node.created");
|
||||
|
|
Loading…
Add table
Reference in a new issue