Initial commit

This commit is contained in:
distinctm
2019-01-22 17:58:20 -05:00
commit d6ced07199
6519 changed files with 752220 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
namespace Faker\Test\Provider;
use Faker\Provider\UserAgent;
use PHPUnit\Framework\TestCase;
class UserAgentTest extends 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());
}
}