More updates to stop using dev or alpha or beta versions.
[yaffs-website] / web / core / tests / Drupal / Tests / Core / Extension / DefaultConfigTest.php
1 <?php
2
3 namespace Drupal\Tests\Core\Extension;
4
5 use Drupal\Tests\UnitTestCase;
6 use Symfony\Component\Yaml\Yaml;
7
8 /**
9  * Tests default configuration of the Extension system.
10  *
11  * @group Extension
12  */
13 class DefaultConfigTest extends UnitTestCase {
14
15   /**
16    * Tests that core.extension.yml is empty by default.
17    *
18    * The default configuration MUST NOT specify any extensions, because every
19    * extension has to be installed in a regular way.
20    *
21    * Otherwise, the regular runtime application would operate with extensions
22    * that were never installed. The default configuration of such extensions
23    * would not exist. Installation hooks would never be executed.
24    */
25   public function testConfigIsEmpty() {
26     $config = Yaml::parse(file_get_contents($this->root . '/core/config/install/core.extension.yml'));
27     $expected = [
28       'module' => [],
29       'theme' => [],
30       'profile' => '',
31     ];
32     $this->assertEquals($expected, $config);
33   }
34
35 }