From 00761946c79387045f1fc704ab0ead1afa9abf37 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Sat, 23 May 2020 01:55:58 +0200 Subject: [PATCH] Stop using app() helper in tests --- framework/core/tests/integration/api/discussions/ShowTest.php | 2 +- framework/core/tests/integration/api/users/CreateTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/core/tests/integration/api/discussions/ShowTest.php b/framework/core/tests/integration/api/discussions/ShowTest.php index df822cd99..131cd6776 100644 --- a/framework/core/tests/integration/api/discussions/ShowTest.php +++ b/framework/core/tests/integration/api/discussions/ShowTest.php @@ -114,7 +114,7 @@ class ShowTest extends TestCase public function when_allowed_guests_can_see_hidden_posts() { /** @var Dispatcher $events */ - $events = app(Dispatcher::class); + $events = $this->app()->getContainer()->make(Dispatcher::class); $events->listen(ScopeModelVisibility::class, function (ScopeModelVisibility $event) { if ($event->ability === 'hidePosts') { diff --git a/framework/core/tests/integration/api/users/CreateTest.php b/framework/core/tests/integration/api/users/CreateTest.php index d92ea868b..c6d7bd198 100644 --- a/framework/core/tests/integration/api/users/CreateTest.php +++ b/framework/core/tests/integration/api/users/CreateTest.php @@ -154,7 +154,7 @@ class CreateTest extends TestCase public function disabling_sign_up_prevents_user_creation() { /** @var SettingsRepositoryInterface $settings */ - $settings = app(SettingsRepositoryInterface::class); + $settings = $this->app()->getContainer()->make(SettingsRepositoryInterface::class); $settings->set('allow_sign_up', false); $response = $this->send(