getUser() public method

public getUser ( )
Exemplo n.º 1
0
 /**
  * @expectedException \LogicException
  * @expectedExceptionMessage The SecurityBundle is not registered in your application.
  */
 public function testGetUserWithEmptyContainer()
 {
     $container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
     $container->expects($this->once())->method('has')->with('security.token_storage')->will($this->returnValue(false));
     $controller = new TestController();
     $controller->setContainer($container);
     $controller->getUser();
 }