public function testRenderFragmentWithoutUser()
 {
     $windowState = $this->createWindowState();
     $this->environment->expects($this->never())->method($this->anything());
     $this->stateManager->expects($this->once())->method('deleteWindowsState')->willThrowException(new AccessDeniedException());
     $this->assertEquals('', $this->extension->renderFragment($this->environment, $windowState));
     $this->assertFalse($windowState->isRenderedSuccessfully());
 }
 public function testRenderFragmentWithEmptyCleanUrl()
 {
     $windowState = $this->createWindowState();
     $this->environment->expects($this->never())->method($this->anything());
     $this->entityManager->expects($this->never())->method($this->anything());
     $this->assertEquals('', $this->extension->renderFragment($this->environment, $windowState));
     $this->assertFalse($windowState->isRenderedSuccessfully());
 }