/** * device models test * @depends test_fetchArchive * @group ultimate **/ public function test_ultimate_deviceModels() { $hd = new HandsetDetection\HD4($this->cloudConfig); $reply = $hd->deviceModels('Nokia'); $data = $hd->getReply(); $this->assertEquals($reply, true); $this->assertGreaterThan(700, count($data['model'])); $this->assertEquals(0, $data['status']); $this->assertEquals('OK', $data['message']); }
die('Please configure your username, secret and site_id'); } require_once 'HD4.php'; $hd = new HandsetDetection\HD4($configFile); /// Vendors example : Get a list of all vendors echo "<h1>Vendors</h1><p>"; if ($hd->deviceVendors()) { $data = $hd->getReply(); print_r($data); } else { print $hd->getError(); } echo "</p>"; // Models example : Get a list of all models for a specific vendor echo "<h1>Nokia Models</h1><p>"; if ($hd->deviceModels('Nokia')) { $data = $hd->getReply(); print_r($data); } else { print $hd->getError(); } echo "</p>"; // View information for a specific handset echo "<h1>Nokia N95 Properties</h1><p>"; if ($hd->deviceView('Nokia', 'N95')) { $data = $hd->getReply(); print_r($data); } else { print $hd->getError(); } echo "</p>";