Happyr\LinkedIn\LinkedInTest::testLoginUrlWithParameter PHP Method

testLoginUrlWithParameter() public method

    public function testLoginUrlWithParameter()
    {
        $loginUrl = 'result';
        $otherUrl = 'otherUrl';
        $generator = $this->getMock('Happyr\\LinkedIn\\Http\\UrlGenerator');
        $auth = $this->getMock('Happyr\\LinkedIn\\Authenticator', ['getLoginUrl'], [], '', false);
        $auth->expects($this->once())->method('getLoginUrl')->with($generator, ['redirect_uri' => $otherUrl])->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(['redirect_uri' => $otherUrl]);
    }