markTestSkipped('Requires WURFL library'); } $this->config['wurflapi']['wurfl_lib_dir'] = constant('TESTS_ZEND_HTTP_USERAGENT_WURFL_LIB_DIR'); $this->config['wurflapi']['wurfl_config_file'] = constant('TESTS_ZEND_HTTP_USERAGENT_WURFL_CONFIG_FILE'); } public function testGetFromRequest() { $request['http_user_agent'] = 'Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleW1ebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A102 Safari/419.3'; $wurfl = Zend_Http_UserAgent_Features_Adapter_WurflApi::getFromRequest($request, $this->config); $this->assertEquals('Safari', $wurfl['mobile_browser']); $this->assertEquals('iPhone OS', $wurfl['device_os']); $this->assertEquals('1.0', $wurfl['device_os_version']); $this->assertEquals('true', $wurfl['has_qwerty_keyboard']); $this->assertEquals('touchscreen', $wurfl['pointing_method']); $this->assertEquals('false', $wurfl['is_tablet']); $this->assertEquals('iPhone', $wurfl['model_name']); $this->assertEquals('Apple', $wurfl['brand_name']); } }