本文整理匯總了PHP中core_useragent::check_edge_version方法的典型用法代碼示例。如果您正苦於以下問題:PHP core_useragent::check_edge_version方法的具體用法?PHP core_useragent::check_edge_version怎麽用?PHP core_useragent::check_edge_version使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類core_useragent
的用法示例。
在下文中一共展示了core_useragent::check_edge_version方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: test_useragent_edge
/**
* @dataProvider user_agents_providers
*/
public function test_useragent_edge($useragent, $tests)
{
// Setup the core_useragent instance.
core_useragent::instance(true, $useragent);
// Edge Tests.
if (isset($tests['is_edge']) && $tests['is_edge']) {
$this->assertTrue(core_useragent::is_edge());
} else {
$this->assertFalse(core_useragent::is_edge());
}
$versions = array('12' => false);
if (isset($tests['check_edge_version'])) {
// The test provider has overwritten some of the above checks.
// Must use the '+' operator, because array_merge will incorrectly rewrite the array keys for integer-based indexes.
$versions = $tests['check_edge_version'] + $versions;
}
foreach ($versions as $version => $result) {
$this->assertEquals($result, core_useragent::check_edge_version($version), "Version incorrectly determined for Edge version '{$version}'");
}
}