PHPUnit: Get rid of deprecated annotation

Refs #1795.
This commit is contained in:
Franz Liedke
2019-07-30 00:09:10 +02:00
committed by Daniël Klabbers
parent 42a7f2f586
commit 970c0f5604
7 changed files with 35 additions and 15 deletions

View File

@ -13,6 +13,7 @@ use Carbon\Carbon;
use Flarum\Api\Controller\ShowDiscussionController;
use Flarum\Discussion\Discussion;
use Flarum\User\User;
use Illuminate\Database\Eloquent\ModelNotFoundException;
class ShowDiscussionControllerTest extends ApiControllerTestCase
{
@ -67,10 +68,11 @@ class ShowDiscussionControllerTest extends ApiControllerTestCase
/**
* @test
* @expectedException \Illuminate\Database\Eloquent\ModelNotFoundException
*/
public function guest_cannot_see_empty_discussion()
{
$this->expectException(ModelNotFoundException::class);
$response = $this->callWith([], ['id' => 1]);
$this->assertEquals(200, $response->getStatusCode());
@ -88,10 +90,11 @@ class ShowDiscussionControllerTest extends ApiControllerTestCase
/**
* @test
* @expectedException \Illuminate\Database\Eloquent\ModelNotFoundException
*/
public function guests_cannot_see_private_discussion()
{
$this->expectException(ModelNotFoundException::class);
$this->callWith([], ['id' => 3]);
}
}