Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added some desktop devices

  • Loading branch information...
commit 5d31c0e796662d2a5ffd5b2a1cb8245b81a7c137 1 parent 6505b5e
@lsmith77 lsmith77 authored
View
3  Helper/DeviceDetection.php
@@ -34,6 +34,9 @@ class DeviceDetection
"generic" => "(mobile|mmp|midp|o2|pda|pocket|psp|symbian|smartphone|treo|up.browser|up.link|vodafone|wap|opera mini)",
),
"desktop" => array(
+ "osx" => "Mac OS X",
+ "linux" => "Linux",
+ "windows" => "Windows",
"generic" => "",
)
);
View
2  Tests/Helper/DeviceDetectionTest.php
@@ -168,7 +168,7 @@ public function testCheckDeviceGalaxyTab()
public function testCheckDeviceDesktop()
{
$device = new DeviceDetection('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0.1) Gecko/20100101 Firefox/8.0.1 FirePHP/0.6');
- $this->assertEquals('generic', $device->getDevice(), 'Firefox type is set to desktop');
+ $this->assertEquals('osx', $device->getDevice(), 'Firefox type is set to desktop');
$this->assertEquals('desktop', $device->getType(), 'Firefox type is set to desktop');
$this->assertTrue($device->isDesktop(), 'Firefox should get recognized as desktop');
}
Please sign in to comment.
Something went wrong with that request. Please try again.