Example #1
0
 public function promoPiwikPro()
 {
     $view = new View('@PiwikPro/promoPiwikProWidget');
     $promo = $this->promo->getContent();
     $view->ctaLinkUrl = $this->advertising->getPromoUrlForOnPremises('PromoWidget', $promo['campaignContent']);
     $view->ctaText = $promo['text'];
     $view->ctaLinkTitle = $this->promo->getLinkTitle();
     return $view->render();
 }
 public function test_getPromoUrlForOnPremises_WithContent()
 {
     $link = $this->advertising->getPromoUrlForOnPremises('Installation_End', 'TestContent');
     $this->assertSame('https://piwik.pro/c/upgrade/?pk_campaign=Upgrade_to_Pro&pk_medium=Installation_End&pk_source=Piwik_App&pk_content=TestContent', $link);
 }