-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from cbschuld/ucbrowser
added UCBrowser
- Loading branch information
Showing
3 changed files
with
566 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
require_once dirname(__FILE__)."/TabDelimitedFileIterator.php"; | ||
|
||
final class UCBrowserTest extends TestCase | ||
{ | ||
/** | ||
* @dataProvider userAgentUCBrowserProvider | ||
* @param $userAgent string Browser's User Agent | ||
* @param $type string Type of the Browser | ||
* @param $browser string Name of the Browser | ||
* @param $version string Version of the Browser | ||
* @param $osType string Type of operating system associated with the Browser | ||
* @param $osName string Name of the operating system associated with the Browser, typically has the version number | ||
* @param $osVersionName string Version of the Operating System (name) | ||
* @param $osVersionNumber string Version of the Operating System (number) | ||
*/ | ||
public function testUCBrowserUserAgent($userAgent,$type,$browser,$version,$osType,$osName,$osVersionName,$osVersionNumber) | ||
{ | ||
$b = new Browser($userAgent); | ||
|
||
$this->assertSame($browser, $b->getBrowser()); | ||
$this->assertSame($version, $b->getVersion()); | ||
} | ||
|
||
public function userAgentUCBrowserProvider() | ||
{ | ||
return new TabDelimitedFileIterator(dirname(__FILE__).'/lists/ucbrowser.txt'); | ||
} | ||
} |
Oops, something went wrong.