public function testTimezoneNotDetected()
 {
     $securityContext = $this->getMock('Symfony\\Component\\Security\\Core\\SecurityContextInterface');
     $securityContext->expects($this->any())->method('getToken')->will($this->returnValue(null));
     $timezoneDetector = new UserBasedTimezoneDetector($securityContext);
     $this->assertEquals(null, $timezoneDetector->getTimezone());
 }
 public function testTimezoneNotDetected()
 {
     if (interface_exists('Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorageInterface')) {
         $storage = $this->getMock('Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorageInterface');
     } else {
         $storage = $this->getMock('Symfony\\Component\\Security\\Core\\SecurityContextInterface');
     }
     $storage->expects($this->any())->method('getToken')->will($this->returnValue(null));
     $timezoneDetector = new UserBasedTimezoneDetector($storage);
     $this->assertEquals(null, $timezoneDetector->getTimezone());
 }