public function executeChart_area_age_distribution(sfWebRequest $request) { $lDomainProfile = DomainProfileTable::getInstance()->find($this->pHostId); $this->pData = MongoUtils::getAgeData($lDomainProfile->getUrl(), $this->pDateFrom, $this->pDateTo, $this->pAggregation); }
public function testGetAgeData() { $data = MongoUtils::getAgeData("www.missmotz.de", $this->from, $this->to, 'daily'); $this->assertEquals(0, $data['data'][0]['u_18']); $this->assertEquals(0, $data['data'][0]['b_18_24']); $this->assertEquals(0, $data['data'][0]['b_25_34']); $this->assertEquals(0, $data['data'][0]['b_35_54']); $this->assertEquals(1000, $data['data'][0]['o_55']); $this->assertEquals('www.missmotz.de', $data['filter']['domain']); $this->assertEquals($this->from, $data['filter']['fromDate']); $this->assertEquals($this->to, $data['filter']['toDate']); $this->assertEquals('daily', $data['filter']['aggregation']); }