organizrnginxsonarrradarrplexdashboardcouchpotatonzbgetbookmarkapplication-dashboardmuximuxlandingpagestartpagelandinghtpcserverhomepagesabnzbdheimdallemby
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
908 B
39 lines
908 B
7 years ago
|
<?php
|
||
|
|
||
|
namespace Faker\Test\Provider;
|
||
|
|
||
|
use Faker\Provider\UserAgent;
|
||
|
|
||
|
class UserAgentTest extends \PHPUnit_Framework_TestCase
|
||
|
{
|
||
|
public function testRandomUserAgent()
|
||
|
{
|
||
|
$this->assertNotNull(UserAgent::userAgent());
|
||
|
}
|
||
|
|
||
|
public function testFirefoxUserAgent()
|
||
|
{
|
||
|
$this->stringContains(' Firefox/', UserAgent::firefox());
|
||
|
}
|
||
|
|
||
|
public function testSafariUserAgent()
|
||
|
{
|
||
|
$this->stringContains('Safari/', UserAgent::safari());
|
||
|
}
|
||
|
|
||
|
public function testInternetExplorerUserAgent()
|
||
|
{
|
||
|
$this->assertStringStartsWith('Mozilla/5.0 (compatible; MSIE ', UserAgent::internetExplorer());
|
||
|
}
|
||
|
|
||
|
public function testOperaUserAgent()
|
||
|
{
|
||
|
$this->assertStringStartsWith('Opera/', UserAgent::opera());
|
||
|
}
|
||
|
|
||
|
public function testChromeUserAgent()
|
||
|
{
|
||
|
$this->stringContains('(KHTML, like Gecko) Chrome/', UserAgent::chrome());
|
||
|
}
|
||
|
}
|