Completed
Pull Request — master (#594)
by Andreas
06:19 queued 03:09
created
tests/FacebookTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         $accessToken = $fb->getDefaultAccessToken();
208 208
 
209 209
         $this->assertInstanceOf('Facebook\Authentication\AccessToken', $accessToken);
210
-        $this->assertEquals('foo_token', (string)$accessToken);
210
+        $this->assertEquals('foo_token', (string) $accessToken);
211 211
     }
212 212
 
213 213
     public function testAnAccessTokenCanBeSetAsAnAccessTokenEntity()
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
         $accessToken = $fb->getDefaultAccessToken();
218 218
 
219 219
         $this->assertInstanceOf('Facebook\Authentication\AccessToken', $accessToken);
220
-        $this->assertEquals('bar_token', (string)$accessToken);
220
+        $this->assertEquals('bar_token', (string) $accessToken);
221 221
     }
222 222
 
223 223
     /**
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
         $request = $fb->request('FOO_VERB', '/foo');
318 318
         $this->assertEquals('1337', $request->getApp()->getId());
319 319
         $this->assertEquals('foo_secret', $request->getApp()->getSecret());
320
-        $this->assertEquals('foo_token', (string)$request->getAccessToken());
320
+        $this->assertEquals('foo_token', (string) $request->getAccessToken());
321 321
         $this->assertEquals('v1337', $request->getGraphVersion());
322 322
         $this->assertEquals(
323 323
             FacebookClient::BASE_GRAPH_URL_BETA,
Please login to merge, or discard this patch.
tests/FacebookClientTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -175,11 +175,11 @@  discard block
 block discarded – undo
175 175
         $fbRequests = [
176 176
             new FacebookRequest($this->fbApp, 'token', 'POST', '/photo', [
177 177
                 'message' => 'foobar',
178
-                'source' => new FacebookFile(__DIR__ . '/foo.txt'),
178
+                'source' => new FacebookFile(__DIR__.'/foo.txt'),
179 179
             ]),
180 180
             new FacebookRequest($this->fbApp, 'token', 'POST', '/video', [
181 181
                 'message' => 'foobar',
182
-                'source' => new FacebookVideo(__DIR__ . '/foo.txt'),
182
+                'source' => new FacebookVideo(__DIR__.'/foo.txt'),
183 183
             ]),
184 184
         ];
185 185
         $fbBatchRequest = new FacebookBatchRequest($this->fbApp, $fbRequests);
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
         list($url, $method, $headers, $body) = $this->fbClient->prepareRequestMessage($fbBatchRequest);
189 189
 
190
-        $this->assertEquals(FacebookClient::BASE_GRAPH_VIDEO_URL . '/' . Facebook::DEFAULT_GRAPH_VERSION, $url);
190
+        $this->assertEquals(FacebookClient::BASE_GRAPH_VIDEO_URL.'/'.Facebook::DEFAULT_GRAPH_VERSION, $url);
191 191
         $this->assertEquals('POST', $method);
192 192
         $this->assertContains('multipart/form-data; boundary=', $headers['Content-Type']);
193 193
         $this->assertContains('Content-Disposition: form-data; name="batch"', $body);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 
210 210
     public function testARequestWithFilesWillBeMultipart()
211 211
     {
212
-        $myFile = new FacebookFile(__DIR__ . '/foo.txt');
212
+        $myFile = new FacebookFile(__DIR__.'/foo.txt');
213 213
         $fbRequest = new FacebookRequest($this->fbApp, 'token', 'POST', '/foo', ['file' => $myFile]);
214 214
         $response = $this->fbClient->sendRequest($fbRequest);
215 215
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         $this->initializeTestApp();
235 235
 
236 236
         // Create a test user
237
-        $testUserPath = '/' . FacebookTestCredentials::$appId . '/accounts/test-users';
237
+        $testUserPath = '/'.FacebookTestCredentials::$appId.'/accounts/test-users';
238 238
         $params = [
239 239
             'installed' => true,
240 240
             'name' => 'Foo Phpunit User',
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
             static::$testFacebookApp,
273 273
             static::$testFacebookApp->getAccessToken(),
274 274
             'DELETE',
275
-            '/' . $testUserId
275
+            '/'.$testUserId
276 276
         );
277 277
         $graphNode = static::$testFacebookClient->sendRequest($request)->getGraphNode();
278 278
 
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 
282 282
     public function initializeTestApp()
283 283
     {
284
-        if (!file_exists(__DIR__ . '/FacebookTestCredentials.php')) {
284
+        if (!file_exists(__DIR__.'/FacebookTestCredentials.php')) {
285 285
             throw new FacebookSDKException(
286 286
                 'You must create a FacebookTestCredentials.php file from FacebookTestCredentials.php.dist'
287 287
             );
Please login to merge, or discard this patch.
tests/FakeGraphApi/FakeGraphApiForResumableUpload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
         if ($this->respondWith == 'FAIL_ON_START') {
60 60
             return new GraphRawResponse(
61 61
                 "HTTP/1.1 500 OK\r\nFoo: Bar",
62
-                '{"error":{"message":"Error validating access token: Session has expired on Monday, ' .
63
-                '10-Aug-15 01:00:00 PDT. The current time is Monday, 10-Aug-15 01:14:23 PDT.",' .
62
+                '{"error":{"message":"Error validating access token: Session has expired on Monday, '.
63
+                '10-Aug-15 01:00:00 PDT. The current time is Monday, 10-Aug-15 01:14:23 PDT.",'.
64 64
                 '"type":"OAuthException","code":190,"error_subcode":463}}'
65 65
             );
66 66
         }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         if ($this->respondWith == 'FAIL_ON_TRANSFER') {
77 77
             return new GraphRawResponse(
78 78
                 "HTTP/1.1 500 OK\r\nFoo: Bar",
79
-                '{"error":{"message":"There was a problem uploading your video. Please try uploading it again.",' .
79
+                '{"error":{"message":"There was a problem uploading your video. Please try uploading it again.",'.
80 80
                 '"type":"FacebookApiException","code":6000,"error_subcode":1363019}}'
81 81
             );
82 82
         }
Please login to merge, or discard this patch.
tests/Helpers/FacebookRedirectLoginHelperTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
             'client_id' => '123',
65 65
             'redirect_uri' => self::REDIRECT_URL,
66 66
             'state' => $this->persistentDataHandler->get('state'),
67
-            'sdk' => 'php-sdk-' . Facebook::VERSION,
67
+            'sdk' => 'php-sdk-'.Facebook::VERSION,
68 68
             'scope' => implode(',', $scope),
69 69
         ];
70 70
         foreach ($params as $key => $value) {
71
-            $this->assertContains($key . '=' . urlencode($value), $loginUrl);
71
+            $this->assertContains($key.'='.urlencode($value), $loginUrl);
72 72
         }
73 73
     }
74 74
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         ];
85 85
         foreach ($params as $key => $value) {
86 86
             $this->assertTrue(
87
-                strpos($logoutUrl, $key . '=' . urlencode($value)) !== false
87
+                strpos($logoutUrl, $key.'='.urlencode($value)) !== false
88 88
             );
89 89
         }
90 90
     }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
         $accessToken = $this->redirectLoginHelper->getAccessToken(self::REDIRECT_URL);
99 99
 
100
-        $this->assertEquals('foo_token_from_code|foo_code|' . self::REDIRECT_URL, (string)$accessToken);
100
+        $this->assertEquals('foo_token_from_code|foo_code|'.self::REDIRECT_URL, (string) $accessToken);
101 101
     }
102 102
 
103 103
     public function testACustomCsprsgCanBeInjected()
Please login to merge, or discard this patch.
tests/Helpers/FooRedirectLoginOAuth2Client.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,6 +29,6 @@
 block discarded – undo
29 29
 {
30 30
     public function getAccessTokenFromCode($code, $redirectUri = '', $machineId = null)
31 31
     {
32
-        return 'foo_token_from_code|' . $code . '|' . $redirectUri;
32
+        return 'foo_token_from_code|'.$code.'|'.$redirectUri;
33 33
     }
34 34
 }
Please login to merge, or discard this patch.
tests/Helpers/FooSignedRequestHelperFacebookClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     {
44 44
         $params = $request->getParams();
45 45
         $rawResponse = json_encode([
46
-            'access_token' => 'foo_access_token_from:' . $params['code'],
46
+            'access_token' => 'foo_access_token_from:'.$params['code'],
47 47
         ]);
48 48
 
49 49
         return new FacebookResponse($request, $rawResponse, 200);
Please login to merge, or discard this patch.