/** * Test admin_index action * * @return void */ public function testAdminIndex() { $this->Comments->admin_index(); $this->assertEqual(count($this->Comments->viewVars['comments']), 4); $this->assertEqual($this->Comments->viewVars['comments'][0]['Comment']['id'], 1); $this->Comments->admin_index('clean'); $this->assertEqual(count($this->Comments->viewVars['comments']), 3); $this->Comments->admin_index(null); $this->assertEqual(count($this->Comments->viewVars['comments']), 4); }