本文整理匯總了PHP中FireCake::detectClientExtension方法的典型用法代碼示例。如果您正苦於以下問題:PHP FireCake::detectClientExtension方法的具體用法?PHP FireCake::detectClientExtension怎麽用?PHP FireCake::detectClientExtension使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FireCake
的用法示例。
在下文中一共展示了FireCake::detectClientExtension方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testDetectClientExtension
/**
* testClientExtensionDetection.
*
* @return void
*/
public function testDetectClientExtension()
{
$back = env('HTTP_USER_AGENT');
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 FirePHP/0.2.1';
$this->assertTrue(FireCake::detectClientExtension());
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 FirePHP/0.0.4';
$this->assertFalse(FireCake::detectClientExtension());
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4';
$this->assertFalse(FireCake::detectClientExtension());
$_SERVER['HTTP_USER_AGENT'] = $back;
}