示例#1
0
 public function testAndroidPhone1()
 {
     // NOTE: Webkit based browser for the Android Mobile Platform
     $s = 'Mozilla/5.0 (Linux; U; Android 2.3.4; fr-fr; HTC Desire Build/GRJ22) ' . 'AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';
     $b = HttpUserAgent::getBrowser($s);
     $this->assertEquals(true, HttpUserAgent::isAndroid($s));
     $this->assertEquals(true, HttpUserAgent::isAndroidPhone($s));
     $this->assertEquals(false, HttpUserAgent::isAndroidTablet($s));
     $this->assertEquals(false, HttpUserAgent::isLinux($s));
 }