public function it_add_customer_event(CustomerEventRepository $repository, CustomerEvent $customerEvent)
 {
     $command = new AddCustomerEventCommand();
     $command->setEvent($customerEvent->getWrappedObject());
     $repository->add($customerEvent)->shouldBeCalled();
     $this->handle($command);
 }
 public function _it_add_pageview_with_referrer(CustomerEventRepository $repository, \TDCrm\Component\CustomerEvent\App\Factory $factory, PageviewEvent $event, TrackedCustomerStorage $trackedCustomerStorage)
 {
     $command = new AddNewPageviewEventCommand($trackedCustomerStorage->getWrappedObject());
     $command->customerId = self::CUSTOMER_ID;
     $command->eventId = self::EVENT_ID;
     $command->ip = self::IP;
     $command->url = self::URL;
     $command->referrer = self::REFERRER;
     $factory->createPageview(['id' => self::EVENT_ID, 'customerId' => null, 'anonymousCustomerId' => self::ANONYMOUS_CUSTOMER_ID, 'url' => self::URL, 'ip' => self::IP, 'referrer' => self::REFERRER])->willReturn($event);
     $repository->add($event)->shouldBeCalled();
     $this->handle($command);
 }