mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 21:11:55 +08:00
26 lines
625 B
PHP
26 lines
625 B
PHP
|
<?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\Tests\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);
|
||
|
}
|
||
|
}
|