Ejemplo n.º 1
0
 protected function init()
 {
     if ($this->advertising->arePiwikProAdsEnabled()) {
         $this->addWidget('PiwikPro_WidgetBlogTitle', 'rssPiwikPro');
         $this->addWidget('PiwikPro_WidgetPiwikProAd', 'promoPiwikPro');
     }
 }
Ejemplo n.º 2
0
 public function test_arePiwikProAdsEnabled_shouldBeDisabledWhenEnterprisePluginIsInstalled()
 {
     $enabled = $this->advertising->arePiwikProAdsEnabled();
     $this->assertTrue($enabled);
     $this->pluginManager->setActivatedPlugins(array('EnterpriseAdmin'));
     $enabled = $this->advertising->arePiwikProAdsEnabled();
     $this->assertFalse($enabled);
 }