public function test__construct_shouldFetchSitesWithNeededColumns_AndReturnEvenSitesHavingNoVisits()
{
$dayToFetch = '2012-12-13';
$lastDate = '2012-12-12';
$dashboard = new Dashboard('day', $dayToFetch, false);
$this->assertSame($this->numSitesToCreate, $dashboard->getNumSites());
$this->assertEquals($lastDate, $dashboard->getLastDate());
$expectedTotals = array('nb_pageviews' => 0, 'nb_visits' => 0, 'nb_actions' => 0, 'revenue' => 0, 'nb_visits_lastdate' => 0);
$this->assertEquals($expectedTotals, $dashboard->getTotals());
$expectedSites = array(array('label' => 'Site 1', 'nb_visits' => 0, 'nb_actions' => 0, 'nb_pageviews' => 0, 'revenue' => '$ 0', 'visits_evolution' => '0%', 'actions_evolution' => '0%', 'pageviews_evolution' => '0%', 'revenue_evolution' => '0%', 'idsite' => 1, 'group' => '', 'main_url' => 'http://piwik.net'), array('label' => 'Site 2', 'nb_visits' => 0, 'nb_actions' => 0, 'nb_pageviews' => 0, 'revenue' => '$ 0', 'visits_evolution' => '0%', 'actions_evolution' => '0%', 'pageviews_evolution' => '0%', 'revenue_evolution' => '0%', 'idsite' => 2, 'group' => '', 'main_url' => 'http://piwik.net'), array('label' => 'Site 3', 'nb_visits' => 0, 'nb_actions' => 0, 'nb_pageviews' => 0, 'revenue' => '$ 0', 'visits_evolution' => '0%', 'actions_evolution' => '0%', 'pageviews_evolution' => '0%', 'revenue_evolution' => '0%', 'idsite' => 3, 'group' => '', 'main_url' => 'http://piwik.net'));
$this->assertEquals($expectedSites, $dashboard->getSites(array(), $limit = 10));
}