mirror of
https://github.com/flarum/framework.git
synced 2024-11-30 05:13:37 +08:00
Stop using app() helper in tests
This commit is contained in:
parent
13c33c409e
commit
00761946c7
|
@ -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') {
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user