Skip to content

Commit c0ca45d

Browse files
committed
fix randomly failing tests
1 parent f9f18d3 commit c0ca45d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/Commands/ClearSettingsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,16 @@ public function testActuallyFlushesSettings(): void
180180
PhpStreamWrapper::register();
181181
PhpStreamWrapper::setContent("y\n");
182182

183+
// Configure handler before getting service
184+
$config = config('Settings');
185+
$config->handlers = ['array'];
186+
183187
// Set some settings
184188
$settings = service('settings');
185189
$settings->set('Example.siteName', 'Test');
186190

187191
$this->assertSame('Test', $settings->get('Example.siteName'));
188192

189-
// Run clear command
190-
$config = config('Settings');
191-
$config->handlers = ['array'];
192-
193193
command('settings:clear');
194194

195195
PhpStreamWrapper::restore();

0 commit comments

Comments
 (0)