Exemplo n.º 1
0
 public function setUp()
 {
     parent::setUp();
     $this->application = new TestConsole(self::$fixture->piwikEnvironment);
     $this->application->setAutoExit(false);
     $this->applicationTester = new ApplicationTester($this->application);
 }
Exemplo n.º 2
0
 public function setUp()
 {
     parent::setUp();
     $application = new Console();
     $application->setAutoExit(false);
     $this->applicationTester = new ApplicationTester($application);
 }
 public function setUp()
 {
     parent::setUp();
     $plugins = Config::getInstance()->Plugins;
     $plugins['Plugins'][] = 'LoginLdap';
     Config::getInstance()->Plugins = $plugins;
     $application = new Console(self::$fixture->piwikEnvironment);
     $application->setAutoExit(false);
     $this->applicationTester = new ApplicationTester($application);
 }
 public function setUp()
 {
     parent::setUp();
     $this->addNonLdapUsers();
     $this->addPreexistingLdapUser();
     $plugins = Config::getInstance()->Plugins;
     $plugins['Plugins'][] = 'LoginLdap';
     Config::getInstance()->Plugins = $plugins;
     $application = new Console(self::$fixture->piwikEnvironment);
     $application->setAutoExit(false);
     $this->applicationTester = new ApplicationTester($application);
     Translate::loadEnglishTranslation();
     // needed due to travis build that tests against minimum required piwik
 }
 public function setUp()
 {
     parent::setUp();
     PurgeOldArchiveData::$todayOverride = Date::factory('2015-02-27');
     $archivePurger = new ArchivePurger();
     $archivePurger->setTodayDate(Date::factory('2015-02-27'));
     $archivePurger->setYesterdayDate(Date::factory('2015-02-26'));
     $archivePurger->setNow(Date::factory('2015-02-27 08:00:00')->getTimestamp());
     $this->application = new Console();
     $this->application->setAutoExit(false);
     $this->application->add(new PurgeOldArchiveData($archivePurger));
     $this->applicationTester = new ApplicationTester($this->application);
     // assert the test data was setup correctly
     self::$fixture->assertInvalidatedArchivesNotPurged(self::$fixture->january);
     self::$fixture->assertInvalidatedArchivesNotPurged(self::$fixture->february);
 }