diff --git a/Helper/DeviceDetection.php b/Helper/DeviceDetection.php index b47c6c0..4939e15 100644 --- a/Helper/DeviceDetection.php +++ b/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" => "", ) ); diff --git a/Tests/Helper/DeviceDetectionTest.php b/Tests/Helper/DeviceDetectionTest.php index c4f8cb8..46cbf63 100644 --- a/Tests/Helper/DeviceDetectionTest.php +++ b/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'); }