Skip to content

Commit

Permalink
Adding more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Dec 1, 2015
1 parent 375191c commit eaea672
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/TestCase/ORM/QueryRegressionTest.php
Expand Up @@ -969,6 +969,24 @@ public function testTypemapInFunctions()
);
}

/**
* Test that the typemaps used in function expressions
* create the correct results.
*
* @return void
*/
public function testTypemapInFunctions2()
{
$table = TableRegistry::get('Comments');
$query = $table->find();
$query->select([
'id',
'max' => $query->func()->max('created', ['datetime'])
]);
$result = $query->all()->first();
$this->assertEquals(new Time('2007-03-18 10:55:23'), $result['max']);
}

/**
* Test that contain queries map types correctly.
*
Expand Down

0 comments on commit eaea672

Please sign in to comment.