Skip to content

Commit

Permalink
added some desktop devices
Browse files Browse the repository at this point in the history
  • Loading branch information
lsmith77 committed Nov 27, 2011
1 parent 6505b5e commit 5d31c0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Helper/DeviceDetection.php
Expand Up @@ -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" => "",
)
);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Helper/DeviceDetectionTest.php
Expand Up @@ -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');
}
Expand Down

0 comments on commit 5d31c0e

Please sign in to comment.