-
Notifications
You must be signed in to change notification settings - Fork 301
/
Copy pathOperaTest.php
33 lines (28 loc) · 1.19 KB
/
OperaTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase;
require_once dirname(__FILE__)."/TabDelimitedFileIterator.php";
final class OperaTest extends TestCase
{
/**
* @dataProvider userAgentOperaProvider
* @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 testOperaUserAgent($userAgent,$type,$browser,$version,$osType,$osName,$osVersionName,$osVersionNumber)
{
$b = new Browser($userAgent);
$this->assertSame($browser, $b->getBrowser());
$this->assertSame($version, $b->getVersion());
}
public function userAgentOperaProvider()
{
return new TabDelimitedFileIterator(dirname(__FILE__).'/lists/chrome.txt');
}
}