Esempio n. 1
0
 public function testGet()
 {
     $fixtures = Stat::$tableFixtures;
     $items = new Models\Items();
     $items->setDimensions($fixtures['data'][0]['dimensions'])->setMetrics($fixtures['data'][0]['metrics']);
     $this->assertEquals($fixtures["data"][0]["dimensions"], $items->getDimensions());
     $this->assertEquals($fixtures["data"][0]["metrics"], $items->getMetrics());
 }
 public function testGet()
 {
     $fixtures = Stat::$drillDownFixtures;
     $dimension = new Models\Dimension();
     $dimension->setId($fixtures["data"][0]["dimension"]["id"])->setName($fixtures["data"][0]["dimension"]["name"]);
     $dimensions = new Models\Dimensions();
     $dimensions->add($dimension);
     $items = new Models\Items();
     $items->setDimensions($dimensions)->setMetrics($fixtures["data"][0]["metrics"]);
     $dimensions = $items->getDimensions()->getAll();
     $this->assertEquals($fixtures["data"][0]["dimension"]["name"], $dimensions[0]->getName());
     $this->assertEquals($fixtures["data"][0]["dimension"]["id"], $dimensions[0]->getId());
     $this->assertEquals($fixtures["data"][0]["metrics"], $items->getMetrics());
 }