Exemple #1
0
 public function testCanInstantiateEvent()
 {
     $event = new Event('Category', 'Action');
     $this->assertEquals('Category', $event->getCategory());
     $this->assertEquals('Action', $event->getAction());
 }
Exemple #2
0
 protected function prepareTrackEvent(Event $event)
 {
     return $this->push('trackEvent', array($event->getCategory(), $event->getAction(), $event->getLabel(), $event->getValue()));
 }
Exemple #3
0
 protected function prepareTrackEvent(Event $event)
 {
     $params = array('send', 'event', $event->getCategory(), $event->getAction());
     $label = $event->getLabel();
     if ($label !== null) {
         $params[] = $label;
         $value = $event->getValue();
         if ($value !== null) {
             $params[] = $value;
         }
     }
     return $this->callGa($params);
 }