Skip to content
Permalink
Browse files

Try to fix aggregate test for SQLServer.

This test is currently failing on SQLServer. Try a different approach to
get the test passing.
  • Loading branch information...
markstory committed Oct 27, 2018
1 parent 0da1088 commit d6d3fda11bab1c0487fec37cc0bff0e7b36b9678
Showing with 6 additions and 5 deletions.
  1. +6 −5 tests/TestCase/ORM/ResultSetTest.php
@@ -445,12 +445,13 @@ public function testCollectionMinAndMax()
public function testCollectionMinAndMaxWithAggregateField()
{
$query = $this->table->find();
$query->select(['count' => 'author_id + 2']);
$query->select([
'counter' => 'COUNT(*)'
])->group('author_id');
$min = $query->min('count');
$max = $query->max('count');
$min = $query->min('counter');
$max = $query->max('counter');
$this->assertEquals(3, $min->count);
$this->assertEquals(5, $max->count);
$this->assertTrue($max > $min);
}
}

0 comments on commit d6d3fda

Please sign in to comment.
You can’t perform that action at this time.