-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #3119373 by alexpott, BramDriesen: Configuration synchronisatio…
…n that both enables & configures a module fails and drupal_flush_all_caches()
- Loading branch information
catch
committed
Mar 19, 2020
1 parent
c898630
commit 6997fb3
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
tests/Drupal/KernelTests/Core/Common/DrupalFlushAllCachesTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace Drupal\KernelTests\Core\Common; | ||
|
||
use Drupal\KernelTests\KernelTestBase; | ||
|
||
/** | ||
* @covers ::drupal_flush_all_caches | ||
* @group Common | ||
*/ | ||
class DrupalFlushAllCachesTest extends KernelTestBase { | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected static $modules = ['system']; | ||
|
||
/** | ||
* Tests that drupal_flush_all_caches() uses core.extension properly. | ||
*/ | ||
public function testDrupalFlushAllCachesModuleList() { | ||
$core_extension = \Drupal::configFactory()->getEditable('core.extension'); | ||
$module = $core_extension->get('module'); | ||
$module['system_test'] = -10; | ||
$core_extension->set('module', module_config_sort($module))->save(); | ||
|
||
drupal_flush_all_caches(); | ||
|
||
$this->assertSame(['system_test', 'path_alias', 'system'], array_keys($this->container->getParameter('container.modules'))); | ||
} | ||
|
||
} |