23
23
*/
24
24
namespace Facebook \Tests \HttpClients ;
25
25
26
- use Facebook \Exceptions \FacebookSDKException ;
27
26
use Facebook \HttpClients \FacebookCurlHttpClient ;
28
27
use Facebook \HttpClients \FacebookCurl ;
29
28
use Facebook \Http \GraphRawResponse ;
@@ -183,7 +182,7 @@ public function testProperlyHandlesRedirectHeaders()
183
182
public function testCanSendNormalRequest ()
184
183
{
185
184
$ this ->curlMock ->init ()->shouldBeCalled ();
186
- $ this ->curlMock ->setoptArray ()->shouldBeCalled ();
185
+ $ this ->curlMock ->setoptArray (Argument:: type ( ' array ' ) )->shouldBeCalled ();
187
186
$ this ->curlMock ->exec ()->willReturn ($ this ->fakeRawHeader . $ this ->fakeRawBody );
188
187
$ this ->curlMock ->errno ()->shouldBeCalled ();
189
188
$ this ->curlMock ->close ()->shouldBeCalled ();
@@ -197,14 +196,14 @@ public function testCanSendNormalRequest()
197
196
}
198
197
199
198
/**
200
- * @expectedException FacebookSDKException
199
+ * @expectedException \Facebook\Exceptions\ FacebookSDKException
201
200
* @expectedExceptionCode 123
202
- * @expectedExceptionMessage " Foo error"
201
+ * @expectedExceptionMessage Foo error
203
202
*/
204
203
public function testThrowsExceptionOnClientError ()
205
204
{
206
205
$ this ->curlMock ->init ()->shouldBeCalled ();
207
- $ this ->curlMock ->setoptArray ()->shouldBeCalled ();
206
+ $ this ->curlMock ->setoptArray (Argument:: type ( ' array ' ) )->shouldBeCalled ();
208
207
$ this ->curlMock ->exec ()->willReturn (false );
209
208
$ this ->curlMock ->errno ()->willReturn (123 );
210
209
$ this ->curlMock ->error ()->willReturn ('Foo error ' );
0 commit comments