/** */ public function testBuild() { $userAgent = ''; $header = array('HTTP_USER_AGENT' => $userAgent); $request = new GenericRequest($header, $userAgent, null, false); $device = new CustomDevice(array($this->mockModelDevice())); $device = DeviceFactory::build($request, $device); self::assertInstanceOf('\\Wurfl\\VirtualCapability\\Tool\\Device', $device); }
/** * */ public function compute() { // Run the DeviceFactory to get the relevant details $device = DeviceFactory::build($this->request, $this->device); $this->storage = array('DeviceOs' => new ManualGroupChild($this->device, $this->request, $this, $device->getOs()->name), 'DeviceOsVersion' => new ManualGroupChild($this->device, $this->request, $this, $device->getOs()->version), 'Browser' => new ManualGroupChild($this->device, $this->request, $this, $device->getBrowser()->name), 'BrowserVersion' => new ManualGroupChild($this->device, $this->request, $this, $device->getBrowser()->version)); }