Skip to content

Commit d40cb3b

Browse files
authored
Merge pull request #83 from cbschuld/more_ie_tests
additional IE tests and cross checks for 11.0
2 parents 9e38157 + c7a7fcd commit d40cb3b

File tree

3 files changed

+343
-476
lines changed

3 files changed

+343
-476
lines changed

lib/Browser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
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+
}

tests/StaticTest.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
}

0 commit comments

Comments
 (0)