Stop using app() helper in tests

This commit is contained in:
Franz Liedke 2020-05-23 01:55:58 +02:00
parent 13c33c409e
commit 00761946c7
2 changed files with 2 additions and 2 deletions

View File

@ -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') {

View File

@ -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(