diff options
author | Matthieu Aubry <matt@piwik.org> | 2016-01-14 03:17:05 +0300 |
---|---|---|
committer | Matthieu Aubry <matt@piwik.org> | 2016-01-14 03:17:05 +0300 |
commit | 598f3f602ddfea3e557a288d9a0e7a917eda6eb4 (patch) | |
tree | 4b124bf8a8440fbfface16d0cdf95efb444f82f5 /tests/PHPUnit/Fixtures | |
parent | 15c2de7f56bbe01094dd06c9745f2208e6c4becc (diff) | |
parent | e42593d9b6cebc217059fe5ae0675d9cebfacfaa (diff) |
Merge pull request #9519 from piwik/improvetests
Improve test data
Diffstat (limited to 'tests/PHPUnit/Fixtures')
-rw-r--r-- | tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php | 13 |
1 files changed, 13 insertions, 0 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"); |