diff options
author | diosmosis <benaka@piwik.pro> | 2015-09-03 00:12:24 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-09-03 01:42:51 +0300 |
commit | 173259c446a6446936f3cfdea4735124a0d346b7 (patch) | |
tree | 4aa7a8f80605955ddfc31c10dab46ff4d59bc629 /tests/PHPUnit/System/TwoVisitsWithCustomVariablesSegmentMatchNONETest.php | |
parent | 76adbdc804d8ab9e2c7e938bf28b7ba0ff4481b7 (diff) |
Refactor API.getSegmentsMetadata and Plugin\Segment so segments are all defined through Plugin\Segment class in dimensions & make sure AutoSuggestAPITest data providers do not use database.
Diffstat (limited to 'tests/PHPUnit/System/TwoVisitsWithCustomVariablesSegmentMatchNONETest.php')
-rwxr-xr-x | tests/PHPUnit/System/TwoVisitsWithCustomVariablesSegmentMatchNONETest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/PHPUnit/System/TwoVisitsWithCustomVariablesSegmentMatchNONETest.php b/tests/PHPUnit/System/TwoVisitsWithCustomVariablesSegmentMatchNONETest.php index 4ab45a24fc..3667f7f65b 100755 --- a/tests/PHPUnit/System/TwoVisitsWithCustomVariablesSegmentMatchNONETest.php +++ b/tests/PHPUnit/System/TwoVisitsWithCustomVariablesSegmentMatchNONETest.php @@ -48,7 +48,7 @@ class TwoVisitsWithCustomVariablesSegmentMatchNONETest extends SystemTestCase public function getSegmentToTest() { - $segments = AutoSuggestAPITest::getSegmentsMetadata(self::$fixture->idSite); + $segments = AutoSuggestAPITest::getSegmentsMetadata(); $minimumExpectedSegmentsCount = 55; // as of Piwik 1.12 $this->assertGreaterThan($minimumExpectedSegmentsCount, count($segments)); @@ -57,18 +57,18 @@ class TwoVisitsWithCustomVariablesSegmentMatchNONETest extends SystemTestCase $seenVisitorId = false; foreach ($segments as $segment) { $value = 'campaign'; - if ($segment['segment'] == 'visitorId') { + if ($segment == 'visitorId') { $seenVisitorId = true; $value = '34c31e04394bdc63'; } - if ($segment['segment'] == 'visitEcommerceStatus') { + if ($segment == 'visitEcommerceStatus') { $value = 'none'; } - $matchNone = $segment['segment'] . '!=' . $value; + $matchNone = $segment . '!=' . $value; // deviceType != campaign matches ALL visits, but we want to match None - if($segment['segment'] == 'deviceType') { - $matchNone = $segment['segment'] . '==car%20browser'; + if($segment == 'deviceType') { + $matchNone = $segment . '==car%20browser'; } $segmentExpression[] = $matchNone; } |