diff -u b/core/tests/Drupal/KernelTests/Core/Extension/ProfileHandlerTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ProfileHandlerTest.php --- b/core/tests/Drupal/KernelTests/Core/Extension/ProfileHandlerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Extension/ProfileHandlerTest.php @@ -32,22 +32,33 @@ $info = $profile_handler->getProfileInfo('testing_inherited'); $this->assertNotEmpty($info); $this->assertEquals($info['name'], 'Testing Inherited'); - $this->assertEquals($info['base profile']['name'], 'minimal'); - $this->assertEquals($info['base profile']['excluded_dependencies'], ['dblog']); + $this->assertEquals($info['base profile']['name'], 'testing'); + $this->assertEquals($info['base profile']['excluded_dependencies'], ['page_cache']); $this->assertTrue(in_array('config', $info['dependencies'], 'config should be found in dependencies')); - $this->assertFalse(in_array('dblog', $info['dependencies'], 'dblog should not be found in dependencies')); + $this->assertFalse(in_array('page_cache', $info['dependencies'], 'page_cache should not be found in dependencies')); $this->assertTrue($info['hidden'], 'Profiles should be hidden'); $this->assertNotEmpty($info['profile_list']); $profile_list = $info['profile_list']; // Testing order of profile list. $this->assertEquals($profile_list, [ - 'minimal' => 'minimal', + 'testing' => 'testing', 'testing_inherited' => 'testing_inherited' ]); // Test that profiles without any base return normalized info. $info = $profile_handler->getProfileInfo('minimal'); - $this->assertEquals($info['base profile'], ['name' => '', 'excluded_dependencies' => []]); + $this->assertInternalType('array', $info['base profile']); + + $this->assertArrayHasKey('name', $info['base profile']); + $this->assertEmpty($info['base profile']['name']); + + $this->assertArrayHasKey('excluded_dependencies', $info['base profile']); + $this->assertInternalType('array', $info['base profile']['excluded_dependencies']); + $this->assertEmpty($info['base profile']['excluded_dependencies']); + + $this->assertArrayHasKey('excluded_themes', $info['base profile']); + $this->assertInternalType('array', $info['base profile']['excluded_themes']); + $this->assertEmpty($info['base profile']['excluded_themes']); } /** @@ -62,7 +73,7 @@ $first_profile = current($profiles); $this->assertEquals(get_class($first_profile), 'Drupal\Core\Extension\Extension'); - $this->assertEquals($first_profile->getName(), 'minimal'); + $this->assertEquals($first_profile->getName(), 'testing'); $this->assertEquals($first_profile->weight, 1000); $this->assertObjectHasAttribute('origin', $first_profile); @@ -80,7 +91,7 @@ public function testSelectDistribution() { /** @var \Drupal\Core\Extension\ProfileHandler $profile_handler */ $profile_handler = $this->container->get('profile_handler'); - $profiles = ['minimal', 'testing_inherited']; + $profiles = ['testing', 'testing_inherited']; $base_info = $profile_handler->getProfileInfo('minimal'); $profile_info = $profile_handler->getProfileInfo('testing_inherited');