1
0
mirror of https://github.com/flarum/core.git synced 2025-10-25 21:56:18 +02:00

Move test infrastructure to Testing namespace in src directory

This commit is contained in:
Alexander Skvortsov
2021-01-13 01:16:59 -05:00
parent 1afbb07037
commit ba0fbd71e6
12 changed files with 6 additions and 6 deletions

View File

@@ -0,0 +1,25 @@
<?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);
}
}