Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SegmentEditor/tests/Unit/SegmentQueryDecoratorTest.php')
-rw-r--r--plugins/SegmentEditor/tests/Unit/SegmentQueryDecoratorTest.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/SegmentEditor/tests/Unit/SegmentQueryDecoratorTest.php b/plugins/SegmentEditor/tests/Unit/SegmentQueryDecoratorTest.php
index 1f7b6a29c1..593bac5bed 100644
--- a/plugins/SegmentEditor/tests/Unit/SegmentQueryDecoratorTest.php
+++ b/plugins/SegmentEditor/tests/Unit/SegmentQueryDecoratorTest.php
@@ -68,7 +68,8 @@ class SegmentQueryDecoratorTest extends \PHPUnit\Framework\TestCase
$query = $this->decorator->getSelectQueryString($expression, '*', 'log_visit', '', array(), '', '', '');
- $this->assertStringStartsWith('/* idSegments = [3] */', $query['sql']);
+ $this->assertStringStartsWith('SELECT /* idSegments = [3] */', $query['sql']);
+ $this->assertEquals(1, substr_count($query['sql'], 'SELECT'));
}
public function test_getSelectQueryString_DecoratesSql_WhenMultipleStoredSegmentsMatchUsedSegment()
@@ -78,7 +79,8 @@ class SegmentQueryDecoratorTest extends \PHPUnit\Framework\TestCase
$query = $this->decorator->getSelectQueryString($expression, '*', 'log_visit', '', array(), '', '', '');
- $this->assertStringStartsWith('/* idSegments = [2, 4] */', $query['sql']);
+ $this->assertStringStartsWith('SELECT /* idSegments = [2, 4] */', $query['sql']);
+ $this->assertEquals(1, substr_count($query['sql'], 'SELECT'));
}
private function getMockSegmentEditorService()