CakeDC\Users\Test\TestCase\Auth\SocialAuthenticateTest::testGetUserNotEmailProvided PHP Method

testGetUserNotEmailProvided() public method

Test getUser
public testGetUserNotEmailProvided ( $rawData, $mapper )
    public function testGetUserNotEmailProvided($rawData, $mapper)
    {
        $this->SocialAuthenticate->expects($this->once())->method('_authenticate')->with($this->Request)->will($this->returnValue($rawData));
        $this->SocialAuthenticate->expects($this->once())->method('_getProviderName')->will($this->returnValue('facebook'));
        $this->SocialAuthenticate->expects($this->once())->method('_mapUser')->will($this->returnValue($mapper));
        $this->SocialAuthenticate->expects($this->once())->method('_socialLogin')->will($this->throwException(new MissingEmailException('missing email')));
        $this->controller->expects($this->once())->method('dispatchEvent')->with(UsersAuthComponent::EVENT_FAILED_SOCIAL_LOGIN);
        $this->controller->expects($this->once())->method('failedSocialLogin');
        $this->SocialAuthenticate->getUser($this->Request);
    }