indexAction() public method

public indexAction ( )
 /**
  * unit test
  */
 public function testIndexAction()
 {
     $request = new Request();
     $formMock = \Mockery::mock(Form::class);
     $formMock->shouldReceive('handleRequest')->with($request)->andReturnSelf();
     $formMock->shouldReceive('isValid')->andReturn(true);
     $formMock->shouldReceive('getData')->andReturn(['content' => ' ']);
     $formViewMock = \Mockery::mock(FormView::class);
     $formMock->shouldReceive('createView')->andReturn($formViewMock);
     $this->formFactoryMock->shouldReceive('createBuilder->add->getForm')->andReturn($formMock);
     $this->twigMock->shouldReceive('render')->withAnyArgs();
     $controller = new DefaultController($this->formFactoryMock, $this->twigMock, __DIR__ . '/../../../app/');
     $x = $controller->indexAction($request);
 }
 public function testNieZalogowany()
 {
     $this->checker->shouldReceive('isGranted')->with('ROLE_USER')->once()->andReturn(false);
     $this->assertEmpty($this->controller->indexAction());
 }