PHPSDKTestCase D

Total Complexity 133
Dependencies 14
Dependents 0
Total lines 1,892
Lines of code 1,648
Logical lines of code 672
Comment lines 59
Methods 120
Properties 1

Methods 120

Method Rating Maintainability Complexity Lines of code
testCurlFailure()
S
51 6 25
testAPIWithBogusAccessToken()
S
56 2 18
testSharedSessionBackedFacebookIsNotRestoredWhenCorrupt()
S
50 1 32
testGraphAPIOAuthSpecError()
S
58 2 16
assertIsSubset()
S
66 3 7
testGraphAPIWithExpiredAccessToken()
S
58 2 15
testGraphAPIWithBogusAccessToken()
S
59 2 15
testSharedSessionBackedFacebookIsRestored()
S
51 1 30
clearSuperGlobals()
S
61 2 13
testGraphAPIMethodOAuthSpecError()
S
60 2 13
testGetCurrentURL()
S
53 1 27
testUserFromAccessTokenIsStored()
S
53 1 26
testInvalidCodeInSignedRequestWillClearData()
S
53 1 26
testInvalidCodeWillClearData()
S
53 1 26
testLowercaseAuthRevokeAuthDestroysSession()
S
53 1 25
testClearSessionBackedFacebook()
S
54 1 25
testGetLoginURLWithScopeParamsAsArray()
S
52 1 25
testUserFromAccessTokenResetsOnApiException()
S
53 1 25
testAuthExpireSessionDestroysSession()
S
53 1 25
testFailedToGetUserFromAccessTokenClearsData()
S
54 1 24
testValidCodeToToken()
S
54 1 24
testGraphAPIWithOnlyParams()
S
53 1 24
testGetLoginURLWithExtraParams()
S
53 1 23
testUserFromAccessTokenPullsID()
S
55 1 22
testSharedClearSessionBackedFacebook()
S
54 1 22
testSharedClearAllSessionBackedFacebook()
S
54 1 22
testNullRedirectURIUsesCurrentURL()
S
55 1 22
testNullRedirectURIAllowsEmptyStringForCookie()
S
55 1 22
testGetUserAndAccessTokenFromSignedRequestNotSession()
S
55 1 21
testGetAccessTokenUsingCodeInJsSdkCookie()
S
55 1 20
testSharedSessionBackedFacebookIgnoresUnsupportedKeyInClear()
S
55 1 20
testLoginURLCustomNext()
S
56 1 19
testGetLoginURL()
S
55 1 19
testSharedSessionBackedFacebook()
S
56 1 19
testSignedRequestRewrite()
S
56 1 19
testSharedSessionBackedFacebookIgnoresUnsupportedKey()
S
56 1 19
testSignedRequestWithoutAuthClearsData()
S
58 1 17
testSessionBackedFacebook()
S
58 1 17
testPersistentCSRFStateWithSharedSession()
S
58 1 17
testSignedRequestWithoutAuthClearsDataInAvailData()
S
58 1 17
testGetUserWithoutCodeOrSignedRequestOrSession()
S
58 1 17
testErrorCodeFromRestAPIThrowsException()
S
59 1 16
testAPIExceptionDuringCodeExchangeIsIgnored()
S
58 1 16
testEmptyResponseInCodeExchangeIsIgnored()
S
59 1 16
testMissingAccessTokenInCodeExchangeIsIgnored()
S
59 1 16
testSessionBackedFacebookIgnoresUnsupportedKey()
S
59 1 16
testConstructorWithFileUpload()
S
59 1 15
testSetFileUploadSupport()
S
60 1 15
testClearAllSessionBackedFacebook()
S
59 1 15
testGetUserAndAccessTokenFromSession()
S
59 1 15
testLoginURLDefaultsDropSignedRequestParamButNotOthers()
S
59 1 14
testPersistentCSRFState()
S
61 1 14
testJsonEncodeOfNonStringParams()
S
59 1 14
testAPIForLoggedOutUsers()
S
60 1 14
testLoginURLDefaultsDropCodeQueryParam()
S
60 1 13
testLoginURLDefaultsDropStateQueryParam()
S
60 1 13
testNonTossedSignedtoken()
S
60 1 13
testSessionBackedFacebookIgnoresUnsupportedKeyInClear()
S
60 1 13
testAppsecretProofNoParams()
S
61 1 12
testGetCodeWithValidCSRFState()
S
62 1 12
kSignedRequestWithWrongAlgo()
S
60 1 12
kValidSignedRequest()
S
63 1 12
testDestroyClearsCookie()
S
61 1 12
testSignedToken()
S
61 1 12
testLogoutURLDefaults()
S
61 1 12
testSecureCurrentUrlWithNonDefaultPort()
S
61 1 12
provideEndsWith()
S
63 1 12
testSecureCurrentUrl()
S
61 1 12
testBundledCACert()
S
61 1 12
testLoginURLDefaults()
S
62 1 11
testGetSignedRequestFromCookie()
S
63 1 11
testSignedRequestWithEmptyValue()
S
63 1 11
testHttpHostForwarded()
S
62 1 11
testNonDefaultPort()
S
62 1 11
kSignedRequestWithBogusSignature()
S
64 1 11
testGetCodeWithInvalidCSRFState()
S
62 1 11
testAppsecretProofWithParams()
S
62 1 11
kSignedRequestWithEmptyValue()
S
81 1 3
tearDown()
S
78 1 4
setUp()
S
81 1 3
testSetAppId()
S
66 1 9
generateMD5HashOfRandomValue()
S
79 1 3
testHttpProtocolForwardedSecure()
S
64 1 10
provideIsAllowedDomain()
S
66 1 9
testIsAllowedDomain()
S
72 1 6
testHttpProtocol()
S
65 1 9
testHttpProtocolForwarded()
S
64 1 10
testConstructor()
S
64 1 10
testEndsWith()
S
72 1 6
testHttpHost()
S
64 1 10
testMetadataCookie()
S
63 1 10
testSetAPISecret()
S
66 1 9
kNonTosedSignedRequest()
S
69 1 7
testEmptyMetadataCookie()
S
67 1 8
testAPIGraphPublicData()
S
65 1 9
testMissingMetadataCookie()
S
69 1 7
testNonUserAccessToken()
S
66 1 9
testGetSignedRequestWithIncorrectSignature()
S
66 1 9
testDisallowSignedRequest()
S
64 1 10
testBase64UrlEncode()
S
73 1 5
testSignedRequestWithWrongAlgo()
S
66 1 9
testMakeAndParse()
S
64 1 10
testMakeSignedRequestExpectsArray()
S
69 1 7
testVideoUpload()
S
65 1 9
testVideoUploadGraph()
S
65 1 9
testGetUserFromSignedRequest()
S
65 1 9
testSetAPPSecret()
S
66 1 9
testGetCodeWithMissingCSRFState()
S
65 1 9
testEmptyCodeReturnsFalse()
S
66 1 9
testQuotedMetadataCookie()
S
63 1 10
testExistingStateRestoredInConstructor()
S
69 1 7
testExceptionConstructorWithErrorCode()
S
72 1 5
testExceptionConstructorWithInvalidErrorCode()
S
74 1 4
testExceptionTypeFalse()
S
75 1 4
testExceptionTypeMixedDraft00()
S
74 1 4
testExceptionTypeDraft00()
S
69 1 6
testExceptionTypeDraft10()
S
72 1 5
testExceptionTypeDefault()
S
74 1 4
testExceptionToString()
S
68 1 7
testSetAccessToken()
S
66 1 9