/** * Test countAll and getAll are equals * * @return void */ public function testCountAllEqualsWhereAll() { $nb = WpHerissonBookmarksTable::countAll(); $list = WpHerissonBookmarksTable::getAll(); $this->assertEquals(sizeof($list), $nb); }
/** * Action to list existing backups * * This is the default action * * @return void */ function indexAction() { $this->view->backups = \Doctrine_Query::create()->from('Herisson\\Model\\WpHerissonBackups b')->execute(); $this->view->localbackups = \Doctrine_Query::create()->from('Herisson\\Model\\WpHerissonLocalbackups b')->execute(); $this->view->nbBookmarks = WpHerissonBookmarksTable::countAll(); $this->view->sizeBookmarks = WpHerissonBookmarksTable::getTableSize(); $friends = \Doctrine_Query::create()->from('Herisson\\Model\\WpHerissonFriends f')->orderby('name')->execute(); $this->view->friends = array(); foreach ($friends as $friend) { $this->view->friends[$friend->id] = $friend; } }