Remove UsesSettingsTrait (#12)

This commit is contained in:
Sami Mazouz 2021-04-14 04:46:04 +01:00 committed by GitHub
parent 76a869a198
commit b2ecb8f020

View File

@ -1,25 +0,0 @@
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
namespace Flarum\Testing\integration;
use Flarum\Settings\SettingsRepositoryInterface;
trait UsesSettings
{
/**
* Removes the settings respository instance from the IoC container.
*
* This allows test cases that add/modify settings to refresh the in-memory settings cache.
*/
protected function purgeSettingsCache()
{
$this->app()->getContainer()->forgetInstance(SettingsRepositoryInterface::class);
}
}