Skip to content

Commit 8119974

Browse files
committed
Remove usage of setExpectedException
1 parent 6578546 commit 8119974

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

tests/FacebookClientTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,11 @@ public function testARequestWithFilesWillBeMultipart()
199199
$this->assertContains('multipart/form-data; boundary=', $headersSent['Content-Type']);
200200
}
201201

202+
/**
203+
* @expectedException \Facebook\Exceptions\FacebookSDKException
204+
*/
202205
public function testAFacebookRequestValidatesTheAccessTokenWhenOneIsNotProvided()
203206
{
204-
$this->setExpectedException(FacebookSDKException::class);
205-
206207
$fbRequest = new FacebookRequest($this->fbApp, null, 'GET', '/foo');
207208
$this->fbClient->sendRequest($fbRequest);
208209
}

tests/FacebookTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,11 @@ public function testPersistentDataHandlerCanBeForced()
163163
);
164164
}
165165

166+
/**
167+
* @expectedException Error
168+
*/
166169
public function testSettingAnInvalidUrlHandlerThrows()
167170
{
168-
$this->setExpectedException(Error::class);
169-
170171
$config = array_merge($this->config, [
171172
'url_detection_handler' => 'foo_handler',
172173
]);

tests/HttpClients/FacebookStreamHttpClientTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
*/
2424
namespace Facebook\Tests\HttpClients;
2525

26-
use Facebook\Exceptions\FacebookSDKException;
2726
use Facebook\HttpClients\FacebookStreamHttpClient;
2827
use Facebook\HttpClients\FacebookStream;
2928
use Facebook\Http\GraphRawResponse;
@@ -104,7 +103,7 @@ public function testCanSendNormalRequest()
104103
}
105104

106105
/**
107-
* @expectedException FacebookSDKException
106+
* @expectedException \Facebook\Exceptions\FacebookSDKException
108107
*/
109108
public function testThrowsExceptionOnClientError()
110109
{

0 commit comments

Comments
 (0)