1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

PHPUnit: Get rid of deprecated annotation

Refs #1795.
This commit is contained in:
Franz Liedke
2019-07-30 00:09:10 +02:00
parent c2586586c4
commit f357434a72
7 changed files with 35 additions and 15 deletions

View File

@@ -15,6 +15,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
{
@@ -69,10 +70,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());
@@ -90,10 +92,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]);
}
}