tests/Test/OAuth2/Provider/AbstractProviderTestCase.php
/**
     * @expectedException \SocialConnect\Provider\Exception\InvalidResponse
     * @expectedExceptionMessage API response is not a valid JSON object
     */
@expectedException \SocialConnect\Provider\Exception\InvalidResponse
@expectedExceptionMessage API response is not a valid JSON object
@expectedException \ SocialConnect \ Provider \ Exception \ InvalidResponse @expectedExceptionMessage API response is not a valid JSON object
public function testGetIdentityNotValidJSON()
    {
        $mockedHttpClient = $this->mockClientResponse(
            'NOT VALID JSON',
            200
        );
        $this->getProvider($mockedHttpClient)->getIdentity(
            new AccessToken(
                [
                    'access_token' => '123456789'
                ]
            )
        );
    }
public function testGetIdentityNotValidJSON ( ) { $ mockedHttpClient = $ this -> mockClientResponse ( 'NOT VALID JSON' , 200 ) ; $ this -> getProvider ( $ mockedHttpClient ) -> getIdentity ( new AccessToken ( [ 'access_token' => '123456789' ] ) ) ; }
@expectedException \SocialConnect\Provider\Exception\InvalidResponse
 @expectedExceptionMessage API response is not a valid JSON object
@expectedException \ SocialConnect \ Provider \ Exception \ InvalidResponse @expectedExceptionMessage API response is not a valid JSON object