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