diff --git a/core/tests/Drupal/KernelTests/KernelTestBaseTest.php b/core/tests/Drupal/KernelTests/KernelTestBaseTest.php index f44c9650f6..7ee0ff9ae9 100644 --- a/core/tests/Drupal/KernelTests/KernelTestBaseTest.php +++ b/core/tests/Drupal/KernelTests/KernelTestBaseTest.php @@ -17,6 +17,14 @@ class KernelTestBaseTest extends KernelTestBase { /** + * {@inheritdoc} + */ + protected function setUpFilesystem() { + parent::setUpFilesystem(); + file_put_contents($this->root . '/sites/default/testing.services.yml', "parameters:\n testing.services.included: true"); + } + + /** * @covers ::setUpBeforeClass */ public function testSetUpBeforeClass() { @@ -40,6 +48,7 @@ public function testBootEnvironment() { 'sync' => [], ], ], + 'services.yml' => "parameters:\n testing.services.included: true", ], ], ], @@ -216,6 +225,13 @@ public function testFileDefaultScheme() { } /** + * Tests that testing.service.yml files are loaded. + */ + public function testTestingServicesYml() { + $this->assertSame(TRUE, \Drupal::getContainer()->getParameter('testing.services.included')); + } + + /** * Tests the assumption that local time is in 'Australia/Sydney'. */ public function testLocalTimeZone() { @@ -300,6 +316,8 @@ protected function tearDown() { $this->assertTrue(empty($result), 'All test tables have been removed.'); } + + unlink($this->root . '/sites/default/testing.services.yml'); } }