Happyr\LinkedIn\LinkedInTest::testLoginUrl PHP Method

testLoginUrl() public method

public testLoginUrl ( )
    public function testLoginUrl()
    {
        $currentUrl = 'currentUrl';
        $loginUrl = 'result';
        $generator = $this->getMock('Happyr\\LinkedIn\\Http\\UrlGenerator', ['getCurrentUrl']);
        $generator->expects($this->once())->method('getCurrentUrl')->willReturn($currentUrl);
        $auth = $this->getMock('Happyr\\LinkedIn\\Authenticator', ['getLoginUrl'], [], '', false);
        $auth->expects($this->once())->method('getLoginUrl')->with($generator, ['redirect_uri' => $currentUrl])->will($this->returnValue($loginUrl));
        $linkedIn = $this->getMock('Happyr\\LinkedIn\\LinkedIn', ['getAuthenticator', 'getUrlGenerator'], [], '', false);
        $linkedIn->expects($this->once())->method('getAuthenticator')->willReturn($auth);
        $linkedIn->expects($this->once())->method('getUrlGenerator')->willReturn($generator);
        $linkedIn->getLoginUrl();
    }