diff --git a/framework/core/tests/Api/Controller/ApiControllerTestCase.php b/framework/core/tests/Api/Controller/ApiControllerTestCase.php index 7f807e182..6e3028d1a 100644 --- a/framework/core/tests/Api/Controller/ApiControllerTestCase.php +++ b/framework/core/tests/Api/Controller/ApiControllerTestCase.php @@ -11,6 +11,7 @@ namespace Flarum\Tests\Api\Controller; +use Flarum\Tests\Test\Concerns\RetrievesAuthorizedUsers; use Flarum\Tests\Test\TestCase; use Flarum\User\User; use Illuminate\Support\Arr; @@ -19,6 +20,8 @@ use Psr\Http\Server\RequestHandlerInterface; abstract class ApiControllerTestCase extends TestCase { + use RetrievesAuthorizedUsers; + /** * @var RequestHandlerInterface */ diff --git a/framework/core/tests/Api/Controller/CreateDiscussionControllerTest.php b/framework/core/tests/Api/Controller/CreateDiscussionControllerTest.php index ac82e81fb..9fdfb4a41 100644 --- a/framework/core/tests/Api/Controller/CreateDiscussionControllerTest.php +++ b/framework/core/tests/Api/Controller/CreateDiscussionControllerTest.php @@ -14,13 +14,10 @@ namespace Flarum\Tests\Api\Controller; use Flarum\Api\Controller\CreateDiscussionController; use Flarum\Discussion\Discussion; use Flarum\Post\Post; -use Flarum\Tests\Test\Concerns\RetrievesAuthorizedUsers; use Illuminate\Support\Arr; class CreateDiscussionControllerTest extends ApiControllerTestCase { - use RetrievesAuthorizedUsers; - protected $controller = CreateDiscussionController::class; protected $data = [ diff --git a/framework/core/tests/Api/Controller/CreateGroupControllerTest.php b/framework/core/tests/Api/Controller/CreateGroupControllerTest.php index b553f43eb..36425435a 100644 --- a/framework/core/tests/Api/Controller/CreateGroupControllerTest.php +++ b/framework/core/tests/Api/Controller/CreateGroupControllerTest.php @@ -13,13 +13,10 @@ namespace Flarum\Tests\Api\Controller; use Flarum\Api\Controller\CreateGroupController; use Flarum\Group\Group; -use Flarum\Tests\Test\Concerns\RetrievesAuthorizedUsers; use Illuminate\Support\Str; class CreateGroupControllerTest extends ApiControllerTestCase { - use RetrievesAuthorizedUsers; - protected $controller = CreateGroupController::class; protected $data = [ diff --git a/framework/core/tests/Api/Controller/CreatePostControllerTest.php b/framework/core/tests/Api/Controller/CreatePostControllerTest.php index e0d30feb6..523b7e75b 100644 --- a/framework/core/tests/Api/Controller/CreatePostControllerTest.php +++ b/framework/core/tests/Api/Controller/CreatePostControllerTest.php @@ -13,13 +13,10 @@ namespace Flarum\Tests\Api\Controller; use Flarum\Api\Controller\CreatePostController; use Flarum\Discussion\Discussion; -use Flarum\Tests\Test\Concerns\RetrievesAuthorizedUsers; use Illuminate\Support\Arr; class CreatePostControllerTest extends ApiControllerTestCase { - use RetrievesAuthorizedUsers; - protected $controller = CreatePostController::class; protected $data = [ diff --git a/framework/core/tests/Api/Controller/CreateTokenControllerTest.php b/framework/core/tests/Api/Controller/CreateTokenControllerTest.php index 82d0f6de3..24c0cf7dd 100644 --- a/framework/core/tests/Api/Controller/CreateTokenControllerTest.php +++ b/framework/core/tests/Api/Controller/CreateTokenControllerTest.php @@ -13,12 +13,9 @@ namespace Flarum\Tests\Api\Controller; use Flarum\Api\Controller\CreateTokenController; use Flarum\Http\AccessToken; -use Flarum\Tests\Test\Concerns\RetrievesAuthorizedUsers; class CreateTokenControllerTest extends ApiControllerTestCase { - use RetrievesAuthorizedUsers; - protected $controller = CreateTokenController::class; /** diff --git a/framework/core/tests/Api/Controller/CreateUserControllerTest.php b/framework/core/tests/Api/Controller/CreateUserControllerTest.php index bbb127943..d7ca4a83c 100644 --- a/framework/core/tests/Api/Controller/CreateUserControllerTest.php +++ b/framework/core/tests/Api/Controller/CreateUserControllerTest.php @@ -13,14 +13,11 @@ namespace Flarum\Tests\Api\Controller; use Flarum\Api\Controller\CreateUserController; use Flarum\Settings\SettingsRepositoryInterface; -use Flarum\Tests\Test\Concerns\RetrievesAuthorizedUsers; use Flarum\User\User; use Illuminate\Support\Arr; class CreateUserControllerTest extends ApiControllerTestCase { - use RetrievesAuthorizedUsers; - protected $controller = CreateUserController::class; protected $data = [ diff --git a/framework/core/tests/Api/Controller/DeleteDiscussionControllerTest.php b/framework/core/tests/Api/Controller/DeleteDiscussionControllerTest.php index e4c68dde6..bd174d73e 100644 --- a/framework/core/tests/Api/Controller/DeleteDiscussionControllerTest.php +++ b/framework/core/tests/Api/Controller/DeleteDiscussionControllerTest.php @@ -13,12 +13,9 @@ namespace Flarum\Tests\Api\Controller; use Flarum\Api\Controller\DeleteDiscussionController; use Flarum\Discussion\Discussion; -use Flarum\Tests\Test\Concerns\RetrievesAuthorizedUsers; class DeleteDiscussionControllerTest extends ApiControllerTestCase { - use RetrievesAuthorizedUsers; - protected $controller = DeleteDiscussionController::class; protected $discussion; diff --git a/framework/core/tests/Api/Controller/ListDiscussionControllerTest.php b/framework/core/tests/Api/Controller/ListDiscussionControllerTest.php index 9ccd265f3..276d0273a 100644 --- a/framework/core/tests/Api/Controller/ListDiscussionControllerTest.php +++ b/framework/core/tests/Api/Controller/ListDiscussionControllerTest.php @@ -13,12 +13,9 @@ namespace Flarum\Tests\Api\Controller; use Flarum\Api\Controller\ListDiscussionsController; use Flarum\Discussion\Discussion; -use Flarum\Tests\Test\Concerns\RetrievesAuthorizedUsers; class ListDiscussionControllerTest extends ApiControllerTestCase { - use RetrievesAuthorizedUsers; - protected $controller = ListDiscussionsController::class; /**