File tree Expand file tree Collapse file tree 3 files changed +343
-476
lines changed
Expand file tree Collapse file tree 3 files changed +343
-476
lines changed Original file line number Diff line number Diff line change 33/**
44 * File: Browser.php
55 * Author: Chris Schuld (http://chrisschuld.com/)
6- * Last Modified: June 26nd , 2019
7- * @version 1.9.3
6+ * Last Modified: July 9th , 2019
7+ * @version 1.9.4
88 * @package PegasusPHP
99 *
1010 * Copyright (C) 2008-2019 Chris Schuld ([email protected] ) @@ -1814,4 +1814,4 @@ protected function checkPlatform()
18141814 $ this ->_platform = self ::PLATFORM_I_FRAME ;
18151815 }
18161816 }
1817- }
1817+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ declare (strict_types=1 );
3+
4+ use PHPUnit \Framework \TestCase ;
5+
6+ require_once dirname (__FILE__ )."/TabDelimitedFileIterator.php " ;
7+
8+ final class StaticTest extends TestCase
9+ {
10+ public function testStaticUserAgent ()
11+ {
12+ $ userAgents = [
13+ 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko ' => [
14+ 'browser ' => Browser::BROWSER_IE ,
15+ 'version ' => '11.0 '
16+ ]
17+ ];
18+ foreach ($ userAgents as $ userAgent => $ info ) {
19+ $ b = new Browser ($ userAgent );
20+ $ this ->assertSame ($ info ['browser ' ], $ b ->getBrowser ());
21+ $ this ->assertSame ($ info ['version ' ], $ b ->getVersion ());
22+ }
23+
24+ }
25+ }
You can’t perform that action at this time.
0 commit comments