Completed
Pull Request — master (#633)
by
unknown
03:13
created
tests/FacebookRequestTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -125,14 +125,14 @@  discard block
 block discarded – undo
125 125
 
126 126
         $getUrl = $getRequest->getUrl();
127 127
         $expectedParams = 'foo=bar&access_token=foo_token&appsecret_proof=df4256903ba4e23636cc142117aa632133d75c642bd2a68955be1443bd14deb9';
128
-        $expectedUrl = '/' . Facebook::DEFAULT_GRAPH_VERSION . '/foo?' . $expectedParams;
128
+        $expectedUrl = '/'.Facebook::DEFAULT_GRAPH_VERSION.'/foo?'.$expectedParams;
129 129
 
130 130
         $this->assertEquals($expectedUrl, $getUrl);
131 131
 
132 132
         $postRequest = new FacebookRequest($app, 'foo_token', 'POST', '/bar', ['foo' => 'bar']);
133 133
 
134 134
         $postUrl = $postRequest->getUrl();
135
-        $expectedUrl = '/' . Facebook::DEFAULT_GRAPH_VERSION . '/bar';
135
+        $expectedUrl = '/'.Facebook::DEFAULT_GRAPH_VERSION.'/bar';
136 136
 
137 137
         $this->assertEquals($expectedUrl, $postUrl);
138 138
     }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         $url = $request->getUrl();
157 157
 
158 158
         $expectedParams = 'bar=baz&access_token=foo_token&appsecret_proof=df4256903ba4e23636cc142117aa632133d75c642bd2a68955be1443bd14deb9';
159
-        $expectedUrl = '/' . Facebook::DEFAULT_GRAPH_VERSION . '/foo?' . $expectedParams;
159
+        $expectedUrl = '/'.Facebook::DEFAULT_GRAPH_VERSION.'/foo?'.$expectedParams;
160 160
         $this->assertEquals($expectedUrl, $url);
161 161
 
162 162
         $params = $request->getParams();
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
     public function testAFileCanBeAddedToParams()
173 173
     {
174
-        $myFile = new FacebookFile(__DIR__ . '/foo.txt');
174
+        $myFile = new FacebookFile(__DIR__.'/foo.txt');
175 175
         $params = [
176 176
             'name' => 'Foo Bar',
177 177
             'source' => $myFile,
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
     public function testAVideoCanBeAddedToParams()
191 191
     {
192
-        $myFile = new FacebookVideo(__DIR__ . '/foo.txt');
192
+        $myFile = new FacebookVideo(__DIR__.'/foo.txt');
193 193
         $params = [
194 194
             'name' => 'Foo Bar',
195 195
             'source' => $myFile,
Please login to merge, or discard this patch.
tests/FacebookAppTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         $accessToken = $this->app->getAccessToken();
53 53
 
54 54
         $this->assertInstanceOf('Facebook\Authentication\AccessToken', $accessToken);
55
-        $this->assertEquals('id|secret', (string)$accessToken);
55
+        $this->assertEquals('id|secret', (string) $accessToken);
56 56
     }
57 57
 
58 58
     public function testSerialization()
Please login to merge, or discard this patch.
tests/HttpClients/FacebookCurlHttpClientTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             ->andReturn(null);
59 59
         $this->curlMock
60 60
             ->shouldReceive('setoptArray')
61
-            ->with(m::on(function ($arg) {
61
+            ->with(m::on(function($arg) {
62 62
 
63 63
                 // array_diff() will sometimes trigger error on child-arrays
64 64
                 if (['X-Foo-Header: X-Bar'] !== $arg[CURLOPT_HTTPHEADER]) {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             ->andReturn(null);
102 102
         $this->curlMock
103 103
             ->shouldReceive('setoptArray')
104
-            ->with(m::on(function ($arg) {
104
+            ->with(m::on(function($arg) {
105 105
 
106 106
                 // array_diff() will sometimes trigger error on child-arrays
107 107
                 if ([] !== $arg[CURLOPT_HTTPHEADER]) {
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         $this->curlMock
153 153
             ->shouldReceive('exec')
154 154
             ->once()
155
-            ->andReturn($this->fakeRawHeader . $this->fakeRawBody);
155
+            ->andReturn($this->fakeRawHeader.$this->fakeRawBody);
156 156
 
157 157
         $this->curlClient->sendRequest();
158 158
         list($rawHeader, $rawBody) = $this->curlClient->extractResponseHeadersAndBody();
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
 
164 164
     public function testProperlyHandlesProxyHeaders()
165 165
     {
166
-        $rawHeader = $this->fakeRawProxyHeader . $this->fakeRawHeader;
166
+        $rawHeader = $this->fakeRawProxyHeader.$this->fakeRawHeader;
167 167
         $this->curlMock
168 168
             ->shouldReceive('exec')
169 169
             ->once()
170
-            ->andReturn($rawHeader . $this->fakeRawBody);
170
+            ->andReturn($rawHeader.$this->fakeRawBody);
171 171
 
172 172
         $this->curlClient->sendRequest();
173 173
         list($rawHeaders, $rawBody) = $this->curlClient->extractResponseHeadersAndBody();
@@ -178,11 +178,11 @@  discard block
 block discarded – undo
178 178
 
179 179
     public function testProperlyHandlesProxyHeadersWithCurlBug()
180 180
     {
181
-        $rawHeader = $this->fakeRawProxyHeader . $this->fakeRawHeader;
181
+        $rawHeader = $this->fakeRawProxyHeader.$this->fakeRawHeader;
182 182
         $this->curlMock
183 183
             ->shouldReceive('exec')
184 184
             ->once()
185
-            ->andReturn($rawHeader . $this->fakeRawBody);
185
+            ->andReturn($rawHeader.$this->fakeRawBody);
186 186
 
187 187
         $this->curlClient->sendRequest();
188 188
         list($rawHeaders, $rawBody) = $this->curlClient->extractResponseHeadersAndBody();
@@ -193,11 +193,11 @@  discard block
 block discarded – undo
193 193
 
194 194
     public function testProperlyHandlesProxyHeadersWithCurlBug2()
195 195
     {
196
-        $rawHeader = $this->fakeRawProxyHeader2 . $this->fakeRawHeader;
196
+        $rawHeader = $this->fakeRawProxyHeader2.$this->fakeRawHeader;
197 197
         $this->curlMock
198 198
             ->shouldReceive('exec')
199 199
             ->once()
200
-            ->andReturn($rawHeader . $this->fakeRawBody);
200
+            ->andReturn($rawHeader.$this->fakeRawBody);
201 201
 
202 202
         $this->curlClient->sendRequest();
203 203
         list($rawHeaders, $rawBody) = $this->curlClient->extractResponseHeadersAndBody();
@@ -208,11 +208,11 @@  discard block
 block discarded – undo
208 208
 
209 209
     public function testProperlyHandlesRedirectHeaders()
210 210
     {
211
-        $rawHeader = $this->fakeRawRedirectHeader . $this->fakeRawHeader;
211
+        $rawHeader = $this->fakeRawRedirectHeader.$this->fakeRawHeader;
212 212
         $this->curlMock
213 213
             ->shouldReceive('exec')
214 214
             ->once()
215
-            ->andReturn($rawHeader . $this->fakeRawBody);
215
+            ->andReturn($rawHeader.$this->fakeRawBody);
216 216
 
217 217
         $this->curlClient->sendRequest();
218 218
         list($rawHeaders, $rawBody) = $this->curlClient->extractResponseHeadersAndBody();
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         $this->curlMock
235 235
             ->shouldReceive('exec')
236 236
             ->once()
237
-            ->andReturn($this->fakeRawHeader . $this->fakeRawBody);
237
+            ->andReturn($this->fakeRawHeader.$this->fakeRawBody);
238 238
         $this->curlMock
239 239
             ->shouldReceive('errno')
240 240
             ->once()
Please login to merge, or discard this patch.
tests/HttpClients/FacebookGuzzleHttpClientTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $this->guzzleMock
59 59
             ->shouldReceive('createRequest')
60 60
             ->once()
61
-            ->with('GET', 'http://foo.com/', m::on(function ($arg) {
61
+            ->with('GET', 'http://foo.com/', m::on(function($arg) {
62 62
 
63 63
                 // array_diff_assoc() will sometimes trigger error on child-arrays
64 64
                 if (['X-foo' => 'bar'] !== $arg['headers']) {
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         $this->guzzleMock
108 108
             ->shouldReceive('createRequest')
109 109
             ->once()
110
-            ->with('GET', 'http://foo.com/', m::on(function ($arg) {
110
+            ->with('GET', 'http://foo.com/', m::on(function($arg) {
111 111
 
112 112
                 // array_diff_assoc() will sometimes trigger error on child-arrays
113 113
                 if ([] !== $arg['headers']) {
Please login to merge, or discard this patch.
tests/HttpClients/FacebookStreamHttpClientTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
         $this->streamMock
60 60
             ->shouldReceive('streamContextCreate')
61 61
             ->once()
62
-            ->with(m::on(function ($arg) {
62
+            ->with(m::on(function($arg) {
63 63
                 if (!isset($arg['http']) || !isset($arg['ssl'])) {
64 64
                     return false;
65 65
                 }
Please login to merge, or discard this patch.
tests/HttpClients/HttpClientsFactoryTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -55,16 +55,16 @@
 block discarded – undo
55 55
     public function httpClientsProvider()
56 56
     {
57 57
         $clients = [
58
-          ['guzzle', self::COMMON_NAMESPACE . 'FacebookGuzzleHttpClient'],
59
-          ['stream', self::COMMON_NAMESPACE . 'FacebookStreamHttpClient'],
60
-          [new Client(), self::COMMON_NAMESPACE . 'FacebookGuzzleHttpClient'],
61
-          [new FacebookGuzzleHttpClient(), self::COMMON_NAMESPACE . 'FacebookGuzzleHttpClient'],
62
-          [new FacebookStreamHttpClient(), self::COMMON_NAMESPACE . 'FacebookStreamHttpClient'],
58
+          ['guzzle', self::COMMON_NAMESPACE.'FacebookGuzzleHttpClient'],
59
+          ['stream', self::COMMON_NAMESPACE.'FacebookStreamHttpClient'],
60
+          [new Client(), self::COMMON_NAMESPACE.'FacebookGuzzleHttpClient'],
61
+          [new FacebookGuzzleHttpClient(), self::COMMON_NAMESPACE.'FacebookGuzzleHttpClient'],
62
+          [new FacebookStreamHttpClient(), self::COMMON_NAMESPACE.'FacebookStreamHttpClient'],
63 63
           [null, self::COMMON_INTERFACE],
64 64
         ];
65 65
         if (extension_loaded('curl')) {
66
-            $clients[] = ['curl', self::COMMON_NAMESPACE . 'FacebookCurlHttpClient'];
67
-            $clients[] = [new FacebookCurlHttpClient(), self::COMMON_NAMESPACE . 'FacebookCurlHttpClient'];
66
+            $clients[] = ['curl', self::COMMON_NAMESPACE.'FacebookCurlHttpClient'];
67
+            $clients[] = [new FacebookCurlHttpClient(), self::COMMON_NAMESPACE.'FacebookCurlHttpClient'];
68 68
         }
69 69
 
70 70
         return $clients;
Please login to merge, or discard this patch.
tests/SignedRequestTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $srTwo = new SignedRequest($this->app, $rawSignedRequest);
60 60
         $payload = $srTwo->getPayload();
61 61
 
62
-        $expectedRawSignedRequest = $this->rawSignature . '.' . $this->rawPayload;
62
+        $expectedRawSignedRequest = $this->rawSignature.'.'.$this->rawPayload;
63 63
         $this->assertEquals($expectedRawSignedRequest, $rawSignedRequest);
64 64
         $this->assertEquals($this->payloadData, $payload);
65 65
     }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function testAnImproperlyEncodedSignatureWillThrowAnException()
95 95
     {
96
-        new SignedRequest($this->app, 'foo_sig.' . $this->rawPayload);
96
+        new SignedRequest($this->app, 'foo_sig.'.$this->rawPayload);
97 97
     }
98 98
 
99 99
     /**
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function testAnImproperlyEncodedPayloadWillThrowAnException()
103 103
     {
104
-        new SignedRequest($this->app, $this->rawSignature . '.foo_payload');
104
+        new SignedRequest($this->app, $this->rawSignature.'.foo_payload');
105 105
     }
106 106
 
107 107
     /**
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
     public function testAsRawSignedRequestCanBeValidatedAndDecoded()
122 122
     {
123
-        $rawSignedRequest = $this->rawSignature . '.' . $this->rawPayload;
123
+        $rawSignedRequest = $this->rawSignature.'.'.$this->rawPayload;
124 124
         $sr = new SignedRequest($this->app, $rawSignedRequest);
125 125
 
126 126
         $this->assertEquals($this->payloadData, $sr->getPayload());
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
     public function testARawSignedRequestCanBeValidatedAndDecoded()
130 130
     {
131
-        $rawSignedRequest = $this->rawSignature . '.' . $this->rawPayload;
131
+        $rawSignedRequest = $this->rawSignature.'.'.$this->rawPayload;
132 132
         $sr = new SignedRequest($this->app, $rawSignedRequest);
133 133
 
134 134
         $this->assertEquals($sr->getPayload(), $this->payloadData);
Please login to merge, or discard this patch.
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/PersistentData/PersistentDataFactoryTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,14 +53,14 @@
 block discarded – undo
53 53
     public function persistentDataHandlerProviders()
54 54
     {
55 55
         $handlers = [
56
-            ['memory', self::COMMON_NAMESPACE . 'FacebookMemoryPersistentDataHandler'],
57
-            [new FacebookMemoryPersistentDataHandler(), self::COMMON_NAMESPACE . 'FacebookMemoryPersistentDataHandler'],
58
-            [new FacebookSessionPersistentDataHandler(false), self::COMMON_NAMESPACE . 'FacebookSessionPersistentDataHandler'],
56
+            ['memory', self::COMMON_NAMESPACE.'FacebookMemoryPersistentDataHandler'],
57
+            [new FacebookMemoryPersistentDataHandler(), self::COMMON_NAMESPACE.'FacebookMemoryPersistentDataHandler'],
58
+            [new FacebookSessionPersistentDataHandler(false), self::COMMON_NAMESPACE.'FacebookSessionPersistentDataHandler'],
59 59
             [null, self::COMMON_INTERFACE],
60 60
         ];
61 61
 
62 62
         if (session_status() === PHP_SESSION_ACTIVE) {
63
-            $handlers[] = ['session', self::COMMON_NAMESPACE . 'FacebookSessionPersistentDataHandler'];
63
+            $handlers[] = ['session', self::COMMON_NAMESPACE.'FacebookSessionPersistentDataHandler'];
64 64
         }
65 65
 
66 66
         return $handlers;
Please login to merge, or discard this patch.