mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-29 07:12:15 +09:00
Add UA::getLocale()
This commit is contained in:
parent
154bddfd18
commit
dfc1082c85
3 changed files with 33 additions and 10 deletions
|
|
@ -47,6 +47,15 @@ class UATest extends \Codeception\TestCase\Test
|
|||
$this->assertFalse(Rhymix\Framework\UA::isRobot('Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko'));
|
||||
}
|
||||
|
||||
public function testGetLocale()
|
||||
{
|
||||
$locale = Rhymix\Framework\UA::getLocale('en-US,en;q=0.8,ko-KR;q=0.5,ko;q=0.3');
|
||||
$this->assertEquals('en-US', $locale);
|
||||
|
||||
$locale = Rhymix\Framework\UA::getLocale('ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3');
|
||||
$this->assertEquals('ko-KR', $locale);
|
||||
}
|
||||
|
||||
public function testGetBrowserInfo()
|
||||
{
|
||||
// Android default browser
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue