/** * test buildQuery() * * @return void */ public function testBuildQuery() { $this->loadFixtures('User'); $TestModel = new User(); $TestModel->cacheQueries = false; $TestModel->order = null; $expected = array('conditions' => array('user' => 'larry'), 'fields' => null, 'joins' => array(), 'limit' => null, 'offset' => null, 'order' => array(0 => null), 'page' => 1, 'group' => null, 'callbacks' => true, 'returnQuery' => true); $result = $TestModel->buildQuery('all', array('returnQuery' => true, 'conditions' => array('user' => 'larry'))); $this->assertEquals($expected, $result); }