1
0
mirror of https://github.com/flarum/core.git synced 2025-08-01 14:10:37 +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

@@ -17,6 +17,7 @@ use Flarum\Api\Client;
use Flarum\Api\Controller\CreateGroupController;
use Flarum\Tests\integration\RetrievesAuthorizedUsers;
use Flarum\Tests\integration\TestCase;
use Flarum\User\Exception\PermissionDeniedException;
use Flarum\User\Guest;
use Flarum\User\User;
use Illuminate\Support\Str;
@@ -57,7 +58,6 @@ class AuthenticateWithApiKeyTest extends TestCase
/**
* @test
* @expectedException \Flarum\User\Exception\PermissionDeniedException
*/
public function cannot_authorize_without_key()
{
@@ -65,6 +65,8 @@ class AuthenticateWithApiKeyTest extends TestCase
$api = $this->app()->getContainer()->make(Client::class);
$api->setErrorHandler(null);
$this->expectException(PermissionDeniedException::class);
$api->send(CreateGroupController::class, new Guest);
}