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:
authorsgiehl <stefan@piwik.org>2016-01-14 00:59:47 +0300
committersgiehl <stefan@piwik.org>2016-01-14 02:03:43 +0300
commite42593d9b6cebc217059fe5ae0675d9cebfacfaa (patch)
treefc92d3d99094872210f40bea2a6f6d5085f5499f /tests/PHPUnit
parent5dd889e9c7418832fe202bd7c28762302a82fe64 (diff)
improve test data by use various useragents
Diffstat (limited to 'tests/PHPUnit')
-rw-r--r--tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php13
-rw-r--r--tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserCode__API.getSuggestedValuesForSegment.xml5
-rw-r--r--tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserCode__VisitsSummary.get_range.xml16
-rw-r--r--tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserEngine__VisitsSummary.get_range.xml18
-rw-r--r--tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserVersion__API.getSuggestedValuesForSegment.xml7
-rw-r--r--tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserVersion__VisitsSummary.get_range.xml16
-rw-r--r--tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceBrand__API.getSuggestedValuesForSegment.xml5
-rw-r--r--tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceBrand__VisitsSummary.get_range.xml16
-rw-r--r--tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceType__API.getSuggestedValuesForSegment.xml3
-rw-r--r--tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemCode__API.getSuggestedValuesForSegment.xml3
-rw-r--r--tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemCode__VisitsSummary.get_range.xml16
-rw-r--r--tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemVersion__API.getSuggestedValuesForSegment.xml8
-rw-r--r--tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemVersion__VisitsSummary.get_range.xml16
13 files changed, 93 insertions, 49 deletions
diff --git a/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php b/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php
index ce454b38d2..8fb67f261a 100644
--- a/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php
+++ b/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php
@@ -41,6 +41,17 @@ class ManyVisitsWithGeoIP extends Fixture
'103.29.196.229', // in Indonesia (Bali), (only Indonesia will show up)
);
+ public $userAgents = array(
+ 'Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.136 Mobile Safari/537.36',
+ 'Mozilla/5.0 (Linux; U; Android 2.3.7; fr-fr; HTC Desire Build/GRI40; MildWild CM-8.0 JG Stable) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',
+ 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.76 Safari/537.36',
+ 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6.3; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)',
+ 'Mozilla/5.0 (Windows NT 6.1; Trident/7.0; MDDSJS; rv:11.0) like Gecko',
+ 'Mozilla/5.0 (Linux; Android 4.1.1; SGPT13 Build/TJDS0170) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Safari/537.36',
+ 'Mozilla/5.0 (Linux; U; Android 4.3; zh-cn; SM-N9006 Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 MQQBrowser/5.0 Mobile Safari/537.36',
+ 'Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.0.14) Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14'
+ );
+
protected $idGoal;
protected $idGoal2;
@@ -107,6 +118,8 @@ class ManyVisitsWithGeoIP extends Fixture
$t->setVisitorId( substr(md5($i + $calledCounter * 1000), 0, $t::LENGTH_VISITOR_ID));
if ($setIp) {
$t->setIp(current($this->ips));
+ $t->setUserAgent(current($this->userAgents));
+ next($this->userAgents);
next($this->ips);
} else {
$t->setIp("1.2.4.$i");
diff --git a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserCode__API.getSuggestedValuesForSegment.xml b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserCode__API.getSuggestedValuesForSegment.xml
index 5ffae0691e..2479501ff3 100644
--- a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserCode__API.getSuggestedValuesForSegment.xml
+++ b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserCode__API.getSuggestedValuesForSegment.xml
@@ -2,5 +2,10 @@
<result>
<row>FF</row>
<row>UNK</row>
+ <row>CM</row>
+ <row>QQ</row>
+ <row>AN</row>
+ <row>CH</row>
+ <row>IE</row>
<row>SF</row>
</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserCode__VisitsSummary.get_range.xml b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserCode__VisitsSummary.get_range.xml
index 602805c283..e7e79a4222 100644
--- a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserCode__VisitsSummary.get_range.xml
+++ b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserCode__VisitsSummary.get_range.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
- <nb_visits>27</nb_visits>
- <nb_actions>73</nb_actions>
- <nb_visits_converted>27</nb_visits_converted>
- <bounce_count>14</bounce_count>
- <sum_visit_length>21073</sum_visit_length>
+ <nb_visits>20</nb_visits>
+ <nb_actions>55</nb_actions>
+ <nb_visits_converted>20</nb_visits_converted>
+ <bounce_count>10</bounce_count>
+ <sum_visit_length>16210</sum_visit_length>
<max_actions>5</max_actions>
- <bounce_rate>52%</bounce_rate>
- <nb_actions_per_visit>2.7</nb_actions_per_visit>
- <avg_time_on_site>780</avg_time_on_site>
+ <bounce_rate>50%</bounce_rate>
+ <nb_actions_per_visit>2.8</nb_actions_per_visit>
+ <avg_time_on_site>811</avg_time_on_site>
</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserEngine__VisitsSummary.get_range.xml b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserEngine__VisitsSummary.get_range.xml
index dfa3a20623..c0631c362b 100644
--- a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserEngine__VisitsSummary.get_range.xml
+++ b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserEngine__VisitsSummary.get_range.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
- <nb_visits>1</nb_visits>
- <nb_actions>1</nb_actions>
- <nb_visits_converted>1</nb_visits_converted>
- <bounce_count>1</bounce_count>
- <sum_visit_length>0</sum_visit_length>
- <max_actions>1</max_actions>
- <bounce_rate>100%</bounce_rate>
- <nb_actions_per_visit>1</nb_actions_per_visit>
- <avg_time_on_site>0</avg_time_on_site>
+ <nb_visits>5</nb_visits>
+ <nb_actions>12</nb_actions>
+ <nb_visits_converted>5</nb_visits_converted>
+ <bounce_count>3</bounce_count>
+ <sum_visit_length>3242</sum_visit_length>
+ <max_actions>5</max_actions>
+ <bounce_rate>60%</bounce_rate>
+ <nb_actions_per_visit>2.4</nb_actions_per_visit>
+ <avg_time_on_site>648</avg_time_on_site>
</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserVersion__API.getSuggestedValuesForSegment.xml b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserVersion__API.getSuggestedValuesForSegment.xml
index abcc43c819..c3c7ec0152 100644
--- a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserVersion__API.getSuggestedValuesForSegment.xml
+++ b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserVersion__API.getSuggestedValuesForSegment.xml
@@ -1,4 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<row>3.6</row>
+ <row>33</row>
+ <row>5</row>
+ <row>3</row>
+ <row>32</row>
+ <row>34</row>
+ <row>11</row>
+ <row>8</row>
</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserVersion__VisitsSummary.get_range.xml b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserVersion__VisitsSummary.get_range.xml
index 602805c283..780ddda63a 100644
--- a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserVersion__VisitsSummary.get_range.xml
+++ b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_browserVersion__VisitsSummary.get_range.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
- <nb_visits>27</nb_visits>
- <nb_actions>73</nb_actions>
- <nb_visits_converted>27</nb_visits_converted>
- <bounce_count>14</bounce_count>
- <sum_visit_length>21073</sum_visit_length>
+ <nb_visits>18</nb_visits>
+ <nb_actions>50</nb_actions>
+ <nb_visits_converted>18</nb_visits_converted>
+ <bounce_count>9</bounce_count>
+ <sum_visit_length>14589</sum_visit_length>
<max_actions>5</max_actions>
- <bounce_rate>52%</bounce_rate>
- <nb_actions_per_visit>2.7</nb_actions_per_visit>
- <avg_time_on_site>780</avg_time_on_site>
+ <bounce_rate>50%</bounce_rate>
+ <nb_actions_per_visit>2.8</nb_actions_per_visit>
+ <avg_time_on_site>811</avg_time_on_site>
</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceBrand__API.getSuggestedValuesForSegment.xml b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceBrand__API.getSuggestedValuesForSegment.xml
index b406b0dc48..e421ad0903 100644
--- a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceBrand__API.getSuggestedValuesForSegment.xml
+++ b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceBrand__API.getSuggestedValuesForSegment.xml
@@ -1,4 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<row>Unknown</row>
+ <row>HTC</row>
+ <row>Samsung</row>
+ <row>Google</row>
+ <row>Dell</row>
+ <row>Sony</row>
</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceBrand__VisitsSummary.get_range.xml b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceBrand__VisitsSummary.get_range.xml
index f3bee672d6..828ec1e21b 100644
--- a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceBrand__VisitsSummary.get_range.xml
+++ b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceBrand__VisitsSummary.get_range.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
- <nb_visits>35</nb_visits>
- <nb_actions>95</nb_actions>
- <nb_visits_converted>35</nb_visits_converted>
- <bounce_count>18</bounce_count>
- <sum_visit_length>27557</sum_visit_length>
+ <nb_visits>27</nb_visits>
+ <nb_actions>76</nb_actions>
+ <nb_visits_converted>27</nb_visits_converted>
+ <bounce_count>13</bounce_count>
+ <sum_visit_length>22694</sum_visit_length>
<max_actions>5</max_actions>
- <bounce_rate>51%</bounce_rate>
- <nb_actions_per_visit>2.7</nb_actions_per_visit>
- <avg_time_on_site>787</avg_time_on_site>
+ <bounce_rate>48%</bounce_rate>
+ <nb_actions_per_visit>2.8</nb_actions_per_visit>
+ <avg_time_on_site>841</avg_time_on_site>
</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceType__API.getSuggestedValuesForSegment.xml b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceType__API.getSuggestedValuesForSegment.xml
index 4f5796903a..7b9c37df18 100644
--- a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceType__API.getSuggestedValuesForSegment.xml
+++ b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_deviceType__API.getSuggestedValuesForSegment.xml
@@ -1,4 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<row>Desktop</row>
+ <row>Smartphone</row>
+ <row>Phablet</row>
+ <row>Tablet</row>
</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemCode__API.getSuggestedValuesForSegment.xml b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemCode__API.getSuggestedValuesForSegment.xml
index f32d4c4dc1..90e7df368b 100644
--- a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemCode__API.getSuggestedValuesForSegment.xml
+++ b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemCode__API.getSuggestedValuesForSegment.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<row>WIN</row>
+ <row>AND</row>
<row>UNK</row>
+ <row>UBT</row>
+ <row>MLD</row>
</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemCode__VisitsSummary.get_range.xml b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemCode__VisitsSummary.get_range.xml
index 3ce6d98183..fc9d2e2c5a 100644
--- a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemCode__VisitsSummary.get_range.xml
+++ b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemCode__VisitsSummary.get_range.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
- <nb_visits>28</nb_visits>
- <nb_actions>74</nb_actions>
- <nb_visits_converted>28</nb_visits_converted>
- <bounce_count>15</bounce_count>
- <sum_visit_length>21073</sum_visit_length>
+ <nb_visits>22</nb_visits>
+ <nb_actions>54</nb_actions>
+ <nb_visits_converted>22</nb_visits_converted>
+ <bounce_count>13</bounce_count>
+ <sum_visit_length>14589</sum_visit_length>
<max_actions>5</max_actions>
- <bounce_rate>54%</bounce_rate>
- <nb_actions_per_visit>2.6</nb_actions_per_visit>
- <avg_time_on_site>753</avg_time_on_site>
+ <bounce_rate>59%</bounce_rate>
+ <nb_actions_per_visit>2.5</nb_actions_per_visit>
+ <avg_time_on_site>663</avg_time_on_site>
</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemVersion__API.getSuggestedValuesForSegment.xml b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemVersion__API.getSuggestedValuesForSegment.xml
index 0abf9e4246..efcc22ca70 100644
--- a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemVersion__API.getSuggestedValuesForSegment.xml
+++ b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemVersion__API.getSuggestedValuesForSegment.xml
@@ -2,4 +2,12 @@
<result>
<row>XP</row>
<row>UNK</row>
+ <row>4.4</row>
+ <row>4.3</row>
+ <row>9.04</row>
+ <row>8</row>
+ <row>8.1</row>
+ <row>4.1</row>
+ <row>7</row>
+ <row>Vista</row>
</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemVersion__VisitsSummary.get_range.xml b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemVersion__VisitsSummary.get_range.xml
index 3ce6d98183..abb563f023 100644
--- a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemVersion__VisitsSummary.get_range.xml
+++ b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest_operatingSystemVersion__VisitsSummary.get_range.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
- <nb_visits>28</nb_visits>
- <nb_actions>74</nb_actions>
- <nb_visits_converted>28</nb_visits_converted>
- <bounce_count>15</bounce_count>
- <sum_visit_length>21073</sum_visit_length>
+ <nb_visits>19</nb_visits>
+ <nb_actions>51</nb_actions>
+ <nb_visits_converted>19</nb_visits_converted>
+ <bounce_count>10</bounce_count>
+ <sum_visit_length>14589</sum_visit_length>
<max_actions>5</max_actions>
- <bounce_rate>54%</bounce_rate>
- <nb_actions_per_visit>2.6</nb_actions_per_visit>
- <avg_time_on_site>753</avg_time_on_site>
+ <bounce_rate>53%</bounce_rate>
+ <nb_actions_per_visit>2.7</nb_actions_per_visit>
+ <avg_time_on_site>768</avg_time_on_site>
</result> \ No newline at end of file