public function setUp() { parent::setUp(); // setup the access layer $pseudoMockAccess = new FakeAccess(); FakeAccess::$superUser = true; Zend_Registry::set('access', $pseudoMockAccess); }
function setUp() { parent::setUp(); // setup the access layer $pseudoMockAccess = new FakeAccess(); FakeAccess::setIdSitesView(array(1, 2)); FakeAccess::setIdSitesAdmin(array(3, 4)); //finally we set the user as a super user by default FakeAccess::$superUser = true; Zend_Registry::set('access', $pseudoMockAccess); // we make sure the tests don't depend on the config file content Piwik_Config::getInstance()->superuser = array('login' => 'superusertest', 'password' => md5('passwordsuperusertest'), 'email' => '*****@*****.**'); }
function setUp() { parent::setUp(); // setup the access layer $pseudoMockAccess = new FakeAccess(); FakeAccess::$superUser = true; //finally we set the user as a super user by default Zend_Registry::set('access', $pseudoMockAccess); Piwik_PluginsManager::getInstance()->loadPlugins(array('API', 'UserCountry', 'LanguagesManager', 'PDFReports')); $plugin = Piwik_PluginsManager::getInstance()->getLoadedPlugin('LanguagesManager'); $plugin->install(); $plugin = Piwik_PluginsManager::getInstance()->getLoadedPlugin('PDFReports'); $plugin->install(); Piwik_PluginsManager::getInstance()->installLoadedPlugins(); Piwik_PDFReports_API::$cache = array(); $this->idSiteAccess = Piwik_SitesManager_API::getInstance()->addSite("Test", array("http://piwik.net")); $idSite = Piwik_SitesManager_API::getInstance()->addSite("Test", array("http://piwik.net")); FakeAccess::setIdSitesView(array($this->idSiteAccess, 2)); }
public function setUp() { parent::setUp(); Piwik_TablePartitioning::$tablesAlreadyInstalled = null; }
public function tearDown() { parent::tearDown(); $GLOBALS['PIWIK_TRACKER_MODE'] = false; }