public function handleErrorFindsLoginPageWhenConfigurationIsAuto()
 {
     $expected = 'http://www.typo3.org/login/';
     /** @var \R3H6\Error404page\Domain\Model\Error $errorFixture */
     $errorFixture = $this->getErrorFixture();
     /** @var \R3H6\Error404page\Domain\Model\Error $pageFixture */
     $pageFixture = new Page(array('uid' => 123, 'pid' => 1));
     $this->mockPageTsConfig($errorFixture, 'auto');
     $this->pageRepositoryMock->expects($this->once())->method('findLoginPageForError')->with($errorFixture)->will($this->returnValue(null));
     $this->frontendControllerMock->expects($this->once())->method('typoLink')->with($this->equalTo(array('parameter' => '123', 'forceAbsoluteUrl' => true)))->will($this->returnValue($expected));
     $return = $this->subject->handleError($errorFixture);
     $this->assertStringStartsWith($expected, $this->subject->getCachingData());
     $this->assertStringEndsWith('?redirect_url=' . $errorFixture->getUrl(), $this->subject->getCachingData());
     $this->assertContains('pageId_123', $this->subject->getCacheTags(), 'Invalid cache tags');
     $this->assertTrue($return, 'Error handler shoudl return true');
 }