Exemplo n.º 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\Handlers\Normalizer\UserAgentNormalizer
  *
  * @param string $userAgent
  *
  * @return string Normalized user agent
  */
 public function normalizeUserAgent($userAgent)
 {
     return $this->userAgentNormalizer->normalize($userAgent);
 }
Exemplo n.º 2
0
 public function testShouldAddANormalizer()
 {
     $userAgentNormalizer = new UserAgentNormalizer();
     $userAgentNormalizer->add(new Chrome());
     self::assertEquals(1, $userAgentNormalizer->count());
 }