Skip to content
Permalink
Browse files

Add test for find('list') with no fields.

This was a missing case, adding it in for completeness' sake.
  • Loading branch information...
markstory committed Nov 16, 2013
1 parent d499e53 commit b4b1c22a5a3b018deaf9fbfa177844b3304f14de
Showing with 11 additions and 0 deletions.
  1. +11 −0 Cake/Test/TestCase/ORM/TableTest.php
@@ -569,6 +569,17 @@ public function testFindListNoHydration() {
'connection' => $this->connection,
]);
$table->displayField('username');
$query = $table->find('list')
->hydrate(false)
->order('id');
$expected = [
1 => 'mariano',
2 => 'nate',
3 => 'larry',
4 => 'garrett'
];
$this->assertSame($expected, $query->toArray());
$query = $table->find('list', ['fields' => ['id', 'username']])
->hydrate(false)
->order('id');

0 comments on commit b4b1c22

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