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(