Krucas\LaravelUserEmailVerification\Test\VerifiesUsersTest::testVerifyShouldShowSuccessForm PHP Method

testVerifyShouldShowSuccessForm() public method

    public function testVerifyShouldShowSuccessForm()
    {
        $trait = $this->getTraitMock(['verificationRedirectPath']);
        $trait->expects($this->once())->method('verificationRedirectPath')->will($this->returnValue('path'));
        Verification::shouldReceive('broker')->andReturn($broker = $this->getBrokerMock());
        $broker->shouldReceive('verify')->once()->andReturn(VerificationBroker::VERIFIED);
        $this->laravelContainer->shouldReceive('make')->with('redirect', [])->andReturn($redirect = $this->getRedirectMock());
        $redirect->shouldReceive('to')->once()->with('path', 302, [], null)->andReturn($response = m::mock('stdClass'));
        $response->shouldReceive('with')->once()->with('status', 'translated')->andReturn('redirect');
        $this->laravelContainer->shouldReceive('make')->with('translator', [])->andReturn($translator = m::mock('stdClass'));
        $translator->shouldReceive('trans')->andReturn('translated');
        $request = $this->getRequestMock();
        $request->shouldReceive('get');
        $this->assertEquals('redirect', $trait->getVerify($request, 'token'));
    }