Skip to content
Extraits de code Groupes Projets
Valider 882b3f1d rédigé par diosmosis's avatar diosmosis
Parcourir les fichiers

Fixing integration tests.

parent 223a7c46
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -36,9 +36,7 @@ class DatabaseTestCase extends PHPUnit_Framework_TestCase ...@@ -36,9 +36,7 @@ class DatabaseTestCase extends PHPUnit_Framework_TestCase
parent::setUp(); parent::setUp();
$this->fixture = new Fixture(); $this->fixture = new Fixture();
$this->fixture->loadTranslations = false; $this->configureFixture();
$this->fixture->createSuperUser = false;
$this->fixture->configureComponents = false;
$this->fixture->performSetUp(__CLASS__); $this->fixture->performSetUp(__CLASS__);
} }
...@@ -50,4 +48,11 @@ class DatabaseTestCase extends PHPUnit_Framework_TestCase ...@@ -50,4 +48,11 @@ class DatabaseTestCase extends PHPUnit_Framework_TestCase
parent::tearDown(); parent::tearDown();
$this->fixture->performTearDown(); $this->fixture->performTearDown();
} }
protected function configureFixture()
{
$this->fixture->loadTranslations = false;
$this->fixture->createSuperUser = false;
$this->fixture->configureComponents = false;
}
} }
...@@ -294,7 +294,7 @@ class Fixture extends PHPUnit_Framework_Assert ...@@ -294,7 +294,7 @@ class Fixture extends PHPUnit_Framework_Assert
// Manually set the website creation date to a day earlier than the earliest day we record stats for // Manually set the website creation date to a day earlier than the earliest day we record stats for
Db::get()->update(Common::prefixTable("site"), Db::get()->update(Common::prefixTable("site"),
array('ts_created' => Date::factory($dateTime)->subDay(60)->getDatetime()), array('ts_created' => Date::factory($dateTime)->subDay(30)->getDatetime()),
"idsite = $idSite" "idsite = $idSite"
); );
......
...@@ -18,6 +18,11 @@ class Core_TrackerTest extends DatabaseTestCase ...@@ -18,6 +18,11 @@ class Core_TrackerTest extends DatabaseTestCase
Fixture::createWebsite('2014-02-04'); Fixture::createWebsite('2014-02-04');
} }
protected function configureFixture()
{
$this->fixture->createSuperUser = true;
}
/** /**
* Test the Bulk tracking API as documented in: http://developer.piwik.org/api-reference/tracking-api#bulk-tracking * Test the Bulk tracking API as documented in: http://developer.piwik.org/api-reference/tracking-api#bulk-tracking
* *
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter