Commit 3d1c53bc authored by catch's avatar catch

Issue #3093257 by Berdir, alexpott, mikelutz: Install path_alias by default in...

Issue #3093257 by Berdir, alexpott, mikelutz: Install path_alias by default in kernel tests to minimize the impact on contrib tests between alpha and beta
parent a4222d84
......@@ -24,7 +24,7 @@ class ModuleHandlerTest extends KernelTestBase {
* The basic functionality of retrieving enabled modules.
*/
public function testModuleList() {
$module_list = ['system'];
$module_list = ['path_alias', 'system'];
$this->assertModuleList($module_list, 'Initial');
......
......@@ -23,7 +23,7 @@ class SystemGetInfoTest extends KernelTestBase {
public function testSystemGetInfo() {
$system_module_info = system_get_info('module', 'system');
$this->assertSame('System', $system_module_info['name']);
$this->assertSame(['system' => $system_module_info], system_get_info('module'));
$this->assertSame(['path_alias' => system_get_info('module', 'path_alias'), 'system' => $system_module_info], system_get_info('module'));
// The User module is not installed so system_get_info() should return
// an empty array.
......@@ -34,7 +34,7 @@ public function testSystemGetInfo() {
$this->container->get('module_installer')->install(['user']);
$user_module_info = system_get_info('module', 'user');
$this->assertSame('User', $user_module_info['name']);
$this->assertSame(['system' => $system_module_info, 'user' => $user_module_info], system_get_info('module'));
$this->assertSame(['path_alias' => system_get_info('module', 'path_alias'), 'system' => $system_module_info, 'user' => $user_module_info], system_get_info('module'));
// Test theme info. There are no themes installed yet.
$this->assertSame([], system_get_info('theme', 'stable'));
......
......@@ -164,12 +164,17 @@ abstract class KernelTestBase extends TestCase implements ServiceProviderInterfa
* it extends, and so on up the class hierarchy. It is not necessary to
* include modules in your list that a parent class has already declared.
*
* The Path Alias module is always installed because the functionality has
* moved from core to a required module in Drupal 8.8.0. If a kernel test
* requires path alias functionality it is recommended to add the module to
* the test's own $modules property for Drupal 9 compatibility.
*
* @see \Drupal\Tests\KernelTestBase::enableModules()
* @see \Drupal\Tests\KernelTestBase::bootKernel()
*
* @var array
*/
protected static $modules = [];
protected static $modules = ['path_alias'];
/**
* The virtual filesystem root directory.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment