‪TYPO3CMS  9.5
ClientUtilityTest.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types = 1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
20 
24 class ‪ClientUtilityTest extends UnitTestCase
25 {
27  // Utility Functions
29 
35  private function ‪analyzeUserAgentStrings($browserStrings, $expectedMembers)
36  {
37  $actual = $expected = [];
38  foreach ($browserStrings as $browserString) {
39  $infoArray = ‪ClientUtility::getBrowserInfo($browserString);
40  $expected[] = $expectedMembers;
41  $explodedVersion = explode('.', $infoArray['version']);
42  $actual[] = [
43  'browser' => $infoArray['browser'],
44  'version' => array_shift($explodedVersion)
45  ];
46  }
47  $this->assertSame($expected, $actual);
48  }
49 
51  // Tests concerning getBrowserInfo
53 
56  public function ‪checkBrowserInfoIE6()
57  {
58  $browserStrings = [
59  'Mozilla/4.0 (compatible; MSIE 6.1; Windows XP; .NET CLR 1.1.4322; .NET CLR 2.0.50727)',
60  'Mozilla/4.0 (compatible; MSIE 6.1; Windows XP)',
61  'Mozilla/4.0 (compatible; MSIE 6.01; Windows NT 6.0)',
62  'Mozilla/5.0 (Windows; U; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)',
63  'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)',
64  'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4325)',
65  'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1)',
66  'Mozilla/45.0 (compatible; MSIE 6.0; Windows NT 5.1)',
67  'Mozilla/4.08 (compatible; MSIE 6.0; Windows NT 5.1)',
68  'Mozilla/4.01 (compatible; MSIE 6.0; Windows NT 5.1)',
69  'Mozilla/4.0 (X11; MSIE 6.0; i686; .NET CLR 1.1.4322; .NET CLR 2.0.50727; FDM)',
70  'Mozilla/4.0 (Windows; MSIE 6.0; Windows NT 6.0)',
71  'Mozilla/4.0 (Windows; MSIE 6.0; Windows NT 5.2)',
72  'Mozilla/4.0 (Windows; MSIE 6.0; Windows NT 5.0)',
73  'Mozilla/4.0 (Windows; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)',
74  'Mozilla/4.0 (MSIE 6.0; Windows NT 5.1)',
75  'Mozilla/4.0 (MSIE 6.0; Windows NT 5.0)',
76  'Mozilla/4.0 (compatible;MSIE 6.0;Windows 98;Q312461)',
77  'Mozilla/4.0 (Compatible; Windows NT 5.1; MSIE 6.0) (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)',
78  'Mozilla/4.0 (compatible; U; MSIE 6.0; Windows NT 5.1)',
79  'Mozilla/4.0 (compatible; MSIE 6,0; Windows NT 5,1; SV1; Alexa Toolbar)'
80  ];
81  $expectedMembers = [
82  'browser' => 'msie',
83  'version' => '6'
84  ];
85  $this->‪analyzeUserAgentStrings($browserStrings, $expectedMembers);
86  }
87 
91  public function ‪checkBrowserInfoIE7()
92  {
93  $browserStrings = [
94  'Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)',
95  'Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; el-GR)',
96  'Mozilla/5.0 (MSIE 7.0; Macintosh; U; SunOS; X11; gu; SV1; InfoPath.2; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)',
97  'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; c .NET CLR 3.0.04506; .NET CLR 3.5.30707; InfoPath.1; el-GR)',
98  'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; c .NET CLR 3.0.04506; .NET CLR 3.5.30707; InfoPath.1; el-GR)',
99  'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; fr-FR)',
100  'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; en-US)',
101  'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; .NET CLR 2.0.50727)',
102  'Mozilla/4.79 [en] (compatible; MSIE 7.0; Windows NT 5.0; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)',
103  'Mozilla/4.0 (Windows; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)',
104  'Mozilla/4.0 (Mozilla/4.0; MSIE 7.0; Windows NT 5.1; FDM; SV1; .NET CLR 3.0.04506.30)',
105  'Mozilla/4.0 (Mozilla/4.0; MSIE 7.0; Windows NT 5.1; FDM; SV1)',
106  'Mozilla/4.0 (compatible;MSIE 7.0;Windows NT 6.0)',
107  'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)',
108  'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;)',
109  'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; YPC 3.2.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30618)',
110  'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; YPC 3.2.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)',
111  'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; Media Center PC 5.0; .NET CLR 2.0.50727)',
112  'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 3.0.04506)',
113  'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET CLR 1.1.4322)',
114  'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; Trident/7.0; .NET4.0E; .NET4.0C)',
115  'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/5.0)',
116  ];
117  $expectedMembers = [
118  'browser' => 'msie',
119  'version' => '7'
120  ];
121  $this->‪analyzeUserAgentStrings($browserStrings, $expectedMembers);
122  }
123 
127  public function ‪checkBrowserInfoIE8()
128  {
129  $browserStrings = [
130  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.2; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)',
131  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; Media Center PC 6.0; InfoPath.2; MS-RTC LM 8)',
132  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; InfoPath.2)',
133  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Zune 3.0)',
134  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; msn OptimizedIE8;ZHCN)',
135  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MS-RTC LM 8)',
136  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; Zune 4.0)',
137  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3)',
138  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; yie8)',
139  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; Zune 3.0; MS-RTC LM 8)',
140  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; MS-RTC LM 8; Zune 4.0)',
141  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; MS-RTC LM 8)',
142  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; FDM; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET CLR 1.1.4322)',
143  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E; FDM)',
144  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 4.0.20402; MS-RTC LM 8)',
145  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; InfoPath.2; MS-RTC LM 8)',
146  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; InfoPath.2)',
147  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET CLR 4.0.20506)',
148  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)',
149  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; MRA 5.5 (build 02842); SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)',
150  'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30729)'
151  ];
152  $expectedMembers = [
153  'browser' => 'msie',
154  'version' => '8'
155  ];
156  $this->‪analyzeUserAgentStrings($browserStrings, $expectedMembers);
157  }
158 
162  public function ‪checkBrowserInfoIE9()
163  {
164  $browserStrings = [
165  'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)',
166  ];
167  $expectedMembers = [
168  'browser' => 'msie',
169  'version' => '9'
170  ];
171  $this->‪analyzeUserAgentStrings($browserStrings, $expectedMembers);
172  }
173 
177  public function ‪checkBrowserInfoIE10()
178  {
179  $browserStrings = [
180  'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)',
181  ];
182  $expectedMembers = [
183  'browser' => 'msie',
184  'version' => '10'
185  ];
186  $this->‪analyzeUserAgentStrings($browserStrings, $expectedMembers);
187  }
188 
192  public function ‪checkBrowserInfoIE11()
193  {
194  $browserStrings = [
195  'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko',
196  'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; .NET4.0E; .NET4.0C; rv:11.0) like Gecko',
197  ];
198  $expectedMembers = [
199  'browser' => 'msie',
200  'version' => '11'
201  ];
202  $this->‪analyzeUserAgentStrings($browserStrings, $expectedMembers);
203  }
204 
208  public function ‪checkGeckoVersion()
209  {
210  $userAgentString = 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3';
211  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
212  $this->assertEquals('1.9.2.3', $infoArray['all']['gecko']);
213  }
214 
219  {
220  $userAgentString = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';
221  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
222  $this->assertContains('win8', $infoArray['all_systems']);
223  }
224 
229  {
230  $userAgentString = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; Trident/6.0)';
231  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
232  $this->assertContains('win8', $infoArray['all_systems']);
233  }
234 
239  {
240  $userAgentString = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)';
241  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
242  $this->assertContains('win7', $infoArray['all_systems']);
243  }
244 
249  {
250  $userAgentString = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)';
251  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
252  $this->assertContains('winVista', $infoArray['all_systems']);
253  }
254 
259  {
260  $userAgentString = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)';
261  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
262  $this->assertContains('winXP', $infoArray['all_systems']);
263  }
264 
269  {
270  $userAgentString = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SV1)';
271  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
272  $this->assertContains('win2k', $infoArray['all_systems']);
273  }
274 
279  {
280  $userAgentString = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.01; SV1)';
281  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
282  $this->assertContains('win2k', $infoArray['all_systems']);
283  }
284 
289  {
290  $userAgentString = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)';
291  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
292  $this->assertContains('winNT', $infoArray['all_systems']);
293  }
294 
299  {
300  $userAgentString = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7W367a Safari/531.21.10';
301  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
302  $this->assertContains('iOS', $infoArray['all_systems']);
303  }
304 
309  {
310  $userAgentString = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7';
311  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
312  $this->assertContains('iOS', $infoArray['all_systems']);
313  }
314 
319  {
320  $userAgentString = 'Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Geckto) Version/3.0 Mobile/3A101a Safari/419.3';
321  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
322  $this->assertContains('iOS', $infoArray['all_systems']);
323  }
324 
329  {
330  $userAgentString = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-us) AppleWebKit/534.15+ (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4';
331  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
332  $this->assertContains('mac', $infoArray['all_systems']);
333  }
334 
339  {
340  $userAgentString = 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8';
341  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
342  $this->assertContains('linux', $infoArray['all_systems']);
343  }
344 
349  {
350  $userAgentString = 'Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.9) Gecko/20100525 Firefox/3.5.9';
351  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
352  $this->assertContains('unix_sun', $infoArray['all_systems']);
353  }
354 
361  public static function ‪androidUserAgentsProvider()
362  {
363  $agents = [
364  'defaultBrowser' => [
365  'agent' => 'Mozilla/5.0 (Linux; U; Android 2.3; en-US; sdk Build/GRH55) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'
366  ],
367  'operaMini' => [
368  'agent' => 'Opera/9.80 (Android; Opera Mini/6.0.24556/24.816; U; en) Presto/2.5.25 Version/10.54'
369  ]
370  ];
371  return $agents;
372  }
373 
379  {
380  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
381  $this->assertContains('android', $infoArray['all_systems']);
382  }
383 
388  {
389  $userAgentString = 'Links (1.00pre20; OpenBSD 4.8 i386; 80x25)';
390  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
391  $this->assertContains('unix_bsd', $infoArray['all_systems']);
392  }
393 
398  {
399  $userAgentString = 'Links (2.2; NetBSD 5.1 amd64; 80x25)';
400  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
401  $this->assertContains('unix_bsd', $infoArray['all_systems']);
402  }
403 
408  {
409  $userAgentString = 'Mozilla/5.0 (X11; U; FreeBSD amd64; c) AppleWebKit/531.2+ (KHTML, like Gecko) Safari 531.2+ Epiphany/230.2';
410  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
411  $this->assertContains('unix_bsd', $infoArray['all_systems']);
412  }
413 
418  {
419  $userAgentString = 'Mozilla/5.0 (X11; U; CrOS i686 9.10.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.253.0 Safari 532.5';
420  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
421  $this->assertContains('chrome', $infoArray['all_systems']);
422  }
423 
428  {
429  $userAgentString = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9';
430  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
431  $this->assertSame('safari', $infoArray['browser']);
432  }
433 
438  {
439  $userAgentString = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b8) Gecko/20100101 Firefox/4.0b8';
440  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
441  $this->assertSame('firefox', $infoArray['browser']);
442  }
443 
448  {
449  $userAgentString = 'Opera/9.80 (X11; FreeBSD 8.1-RELEASE amd64; U; en) Presto/2.2.15 Version/10.10';
450  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
451  $this->assertSame('opera', $infoArray['browser']);
452  }
453 
458  {
459  $userAgentString = 'Mozilla/5.0 (Linux; U; Android WildPuzzleROM v8.0.7 froyo 2.2; de-de; HTC Wildfire Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';
460  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
461  $this->assertSame('safari', $infoArray['browser']);
462  }
463 
468  {
469  $userAgentString = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5';
470  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
471  $this->assertSame('safari', $infoArray['browser']);
472  }
473 
478  {
479  $userAgentString = 'Mozilla/5.0 (compatible; Konqueror/4.4; FreeBSD) KHTML/4.4.5 (like Gecko)';
480  $infoArray = ‪ClientUtility::getBrowserInfo($userAgentString);
481  $this->assertSame('konqueror', $infoArray['browser']);
482  }
483 }
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfOpenbsd
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfOpenbsd()
Definition: ClientUtilityTest.php:387
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsXp
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsXp()
Definition: ClientUtilityTest.php:258
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\checkBrowserInfoIE7
‪checkBrowserInfoIE7()
Definition: ClientUtilityTest.php:91
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfSafari
‪getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfSafari()
Definition: ClientUtilityTest.php:427
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows8
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows8()
Definition: ClientUtilityTest.php:218
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\checkGeckoVersion
‪checkGeckoVersion()
Definition: ClientUtilityTest.php:208
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\checkBrowserInfoIE9
‪checkBrowserInfoIE9()
Definition: ClientUtilityTest.php:162
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\checkBrowserInfoIE10
‪checkBrowserInfoIE10()
Definition: ClientUtilityTest.php:177
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsNt
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsNt()
Definition: ClientUtilityTest.php:288
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsVista
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsVista()
Definition: ClientUtilityTest.php:248
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\analyzeUserAgentStrings
‪analyzeUserAgentStrings($browserStrings, $expectedMembers)
Definition: ClientUtilityTest.php:35
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\androidUserAgentsProvider
‪static array androidUserAgentsProvider()
Definition: ClientUtilityTest.php:361
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfNetbsd
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfNetbsd()
Definition: ClientUtilityTest.php:397
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfMobileSafariOnIphone
‪getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfMobileSafariOnIphone()
Definition: ClientUtilityTest.php:467
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\checkBrowserInfoIE8
‪checkBrowserInfoIE8()
Definition: ClientUtilityTest.php:127
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfKonqueror
‪getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfKonqueror()
Definition: ClientUtilityTest.php:477
‪TYPO3\CMS\Core\Utility\ClientUtility
Definition: ClientUtility.php:21
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIpad
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIpad()
Definition: ClientUtilityTest.php:298
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfOpera
‪getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfOpera()
Definition: ClientUtilityTest.php:447
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfFreebsd
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfFreebsd()
Definition: ClientUtilityTest.php:407
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfLinux
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfLinux()
Definition: ClientUtilityTest.php:338
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility
Definition: ClientUtilityTest.php:3
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfMobileSafariOnAndroid
‪getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfMobileSafariOnAndroid()
Definition: ClientUtilityTest.php:457
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\checkBrowserInfoIE11
‪checkBrowserInfoIE11()
Definition: ClientUtilityTest.php:192
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIpod
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIpod()
Definition: ClientUtilityTest.php:318
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfFirefox
‪getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfFirefox()
Definition: ClientUtilityTest.php:437
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfSolaris
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfSolaris()
Definition: ClientUtilityTest.php:348
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest
Definition: ClientUtilityTest.php:25
‪TYPO3\CMS\Core\Utility\ClientUtility\getBrowserInfo
‪static array getBrowserInfo($userAgent)
Definition: ClientUtility.php:29
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows2k
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows2k()
Definition: ClientUtilityTest.php:268
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfAndroid
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfAndroid($userAgentString)
Definition: ClientUtilityTest.php:378
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIphone
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIphone()
Definition: ClientUtilityTest.php:308
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfChromeOs
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfChromeOs()
Definition: ClientUtilityTest.php:417
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\checkBrowserInfoIE6
‪checkBrowserInfoIE6()
Definition: ClientUtilityTest.php:56
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows7
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows7()
Definition: ClientUtilityTest.php:238
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows8rev1
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows8rev1()
Definition: ClientUtilityTest.php:228
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfMacOsX
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfMacOsX()
Definition: ClientUtilityTest.php:328
‪TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ClientUtilityTest\getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows2kServicePack1
‪getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows2kServicePack1()
Definition: ClientUtilityTest.php:278