public function testSendVerificationLinkShowFailure()
{
$trait = $this->getTraitMock(['validate']);
$trait->expects($this->once())->method('validate');
$request = $this->getRequestMock();
$request->shouldReceive('only')->with('email')->andReturn(['email' => 'mail']);
Verification::shouldReceive('broker')->andReturn($broker = $this->getBrokerMock());
$broker->shouldReceive('sendVerificationLink')->once()->andReturn(VerificationBroker::INVALID_USER);
$this->laravelContainer->shouldReceive('make')->with('redirect', [])->andReturn($redirect = $this->getRedirectMock());
$redirect->shouldReceive('back')->andReturn($response = m::mock('stdClass'));
$response->shouldReceive('withErrors')->with(['email' => 'translated'])->andReturn('redirect');
$this->laravelContainer->shouldReceive('make')->with('translator', [])->andReturn($translator = m::mock('stdClass'));
$translator->shouldReceive('trans')->andReturn('translated');
$this->assertEquals('redirect', $trait->postResend($request));
}