diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-11-17 06:38:14 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-11-17 06:38:14 +0300 |
commit | 68ca831bd53b7fe950b206b1a8772d29966c6476 (patch) | |
tree | 5e0bc1198f89208a2aa4942d80cc11b1190cf7df /tests/PHPUnit/System/AutoSuggestAPITest.php | |
parent | 5b545affae8dbe6d7ca3dc3c4383bb7b37510f11 (diff) |
Refresh the Cache in tests so that custom variable max slot\ is properly initialised, and all segments are found
Diffstat (limited to 'tests/PHPUnit/System/AutoSuggestAPITest.php')
-rw-r--r-- | tests/PHPUnit/System/AutoSuggestAPITest.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/PHPUnit/System/AutoSuggestAPITest.php b/tests/PHPUnit/System/AutoSuggestAPITest.php index 9f61982e66..22780af180 100644 --- a/tests/PHPUnit/System/AutoSuggestAPITest.php +++ b/tests/PHPUnit/System/AutoSuggestAPITest.php @@ -13,6 +13,7 @@ use Piwik\Date; use Piwik\Tests\Framework\TestCase\SystemTestCase; use Piwik\Tests\Fixtures\ManyVisitsWithGeoIP; use Piwik\Tests\Framework\Fixture; +use Piwik\Tracker\Cache; /** * testing a the auto suggest API for all known segments @@ -32,6 +33,9 @@ class AutoSuggestAPITest extends SystemTestCase */ public function testApi($api, $params) { + // Refresh cache for CustomVariables\Model + Cache::clearCacheGeneral(); + if(self::isPhpVersion53() && self::isTravisCI()) { $this->markTestSkipped("Skipping this test as it seg faults on php 5.3 (bug triggered on travis)"); } @@ -143,7 +147,7 @@ class AutoSuggestAPITest extends SystemTestCase but we should try and test the autosuggest for all new segments. Segments skipped were: ' . implode(', ', self::$skipped)); // and check that most others have been tested - $minimumSegmentsToTest = 43; + $minimumSegmentsToTest = 46; $message = 'PROCESSED ' . self::$processed . ' segments --> it seems some segments "auto-suggested values" haven\'t been tested as we were expecting. '; $this->assertTrue(self::$processed >= $minimumSegmentsToTest, $message); } |