1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

Start transactions before the app is fully booted. (#11)

This make a cleaner state more likely, and ensures that settings set via `$this->setting` are cleaned up after the test case runs.
This commit is contained in:
Alexander Skvortsov
2021-04-12 10:26:05 -04:00
committed by GitHub
parent 675627ac15
commit 76a869a198
3 changed files with 46 additions and 6 deletions

View File

@@ -46,6 +46,17 @@ class TestCaseTest extends TestCase
$this->assertEquals('something_other_than_username', $settings->get('display_name_driver'));
}
/**
* @test
*/
public function settings_cleaned_up_from_previous_method()
{
$settings = $this->app()->getContainer()->make(SettingsRepositoryInterface::class);
$this->assertEquals(null, $settings->get('hello'));
$this->assertEquals(null, $settings->get('display_name_driver'));
}
/**
* @test
*/