Esempio n. 1
0
 public function testSetters()
 {
     $hit = new Hit(Hit::Event, 'mycat', 'myact');
     $hit->setNonInteraction(true)->setCustomDimension(2, 'mydim')->setPage('/mypage')->setCustomDimension(4, 'myotherdim');
     $render = $hit->render();
     $this->assertContains('"nonInteraction":1', $render);
     $this->assertContains('"dimension2":"mydim"', $render);
     $this->assertContains('"dimension4":"myotherdim"', $render);
     $this->assertContains('"page":"/mypage"', $render);
 }
 public function trackHit(Hit $hit)
 {
     $this->trackingBag->add($hit->render());
 }