Пример #1
0
 /**
  * Normalizes the given $userAgent using this handler's User Agent Normalizer.
  * If you need to normalize the user agent you need to override the function in
  * the specific user agent handler.
  * 
  * @see $userAgentNormalizer, WURFL_Request_UserAgentNormalizer
  * @param string $userAgent
  * @return string Normalized user agent
  */
 public function normalizeUserAgent($userAgent)
 {
     return $this->userAgentNormalizer->normalize($userAgent);
 }
Пример #2
0
 /**
  * @test
  * @dataProvider normalizerDataProvider
  *
  */
 public function trimsToTwoDigitTheOsVersion($userAgent, $expected)
 {
     $specific = new WURFL_Request_UserAgentNormalizer_Specific_Android();
     $found = $specific->normalize($this->normalizer->normalize($userAgent));
     $this->assertEquals($expected, $found);
 }