@@ -427,7 +427,7 @@ public function testGraphAPIMethod() {
427
427
} catch (FacebookApiException $ e ) {
428
428
// ProfileDelete means the server understood the DELETE
429
429
$ msg =
430
- 'OAuthException: A user access token is required to request this resource. ' ;
430
+ 'OAuthException: (#200) User cannot access this application ' ;
431
431
$ this ->assertEquals ($ msg , (string ) $ e ,
432
432
'Expect the invalid session message. ' );
433
433
}
@@ -685,19 +685,20 @@ public function testAppSecretCall() {
685
685
'secret ' => self ::SECRET ,
686
686
));
687
687
688
- $ proper_exception_thrown = false ;
689
688
try {
690
689
$ response = $ facebook ->api ('/ ' . self ::APP_ID . '/insights ' );
691
690
$ this ->fail ('Desktop applications need a user token for insights. ' );
692
691
} catch (FacebookApiException $ e ) {
693
- $ proper_exception_thrown =
694
- strpos ($ e ->getMessage (),
695
- 'Requires session when calling from a desktop app ' ) !== false ;
696
- } catch (Exception $ e ) {}
697
-
698
- $ this ->assertTrue ($ proper_exception_thrown ,
699
- 'Incorrect exception type thrown when trying to gain ' .
700
- 'insights for desktop app without a user access token. ' );
692
+ // this test is failing as the graph call is returning the wrong
693
+ // error message
694
+ $ this ->assertTrue (strpos ($ e ->getMessage (),
695
+ 'Requires session when calling from a desktop app ' ) !== false ,
696
+ 'Incorrect exception type thrown when trying to gain ' .
697
+ 'insights for desktop app without a user access token. ' );
698
+ } catch (Exception $ e ) {
699
+ $ this ->fail ('Incorrect exception type thrown when trying to gain ' .
700
+ 'insights for desktop app without a user access token. ' );
701
+ }
701
702
}
702
703
703
704
public function testBase64UrlEncode () {
0 commit comments