diff --git a/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php b/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php index 9801f8b4e790dc58f96614bf867c7e6845016d0b..164b062d627aa6fcbdcbdde4ef5ae9e105a972d0 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php @@ -4,9 +4,7 @@ use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\Core\Extension\ExtensionDiscovery; -use Drupal\Core\Extension\InfoParser; use Drupal\Core\Extension\InfoParserException; -use Drupal\Core\Extension\InfoParserInterface; use Drupal\Core\Extension\ThemeExtensionList; use Drupal\KernelTests\KernelTestBase; use org\bovigo\vfs\vfsStream; @@ -71,8 +69,7 @@ protected function setUpFilesystem() { */ public function testMissingBaseThemeException() { $this->container->get('extension.list.theme') - ->setExtensionDiscovery(new ExtensionDiscovery('vfs://core')) - ->setInfoParser(new VfsInfoParser('vfs:/')); + ->setExtensionDiscovery(new ExtensionDiscovery('vfs://core')); $this->expectException(InfoParserException::class); $this->expectExceptionMessage('Missing required key ("base theme") in themes/test_missing_base_theme/test_missing_base_theme.theme/test_missing_base_theme.theme, see https://www.drupal.org/node/3066038'); @@ -106,19 +103,6 @@ public function setExtensionDiscovery(ExtensionDiscovery $discovery) { return $this; } - /** - * Sets the info parser. - * - * @param \Drupal\Core\Extension\InfoParserInterface $info_parser - * The info parser. - * - * @return self - */ - public function setInfoParser(InfoParserInterface $info_parser) { - $this->infoParser = $info_parser; - return $this; - } - /** * {@inheritdoc} */ @@ -127,14 +111,3 @@ public function getExtensionDiscovery() { } } - -class VfsInfoParser extends InfoParser { - - /** - * {@inheritdoc} - */ - public function parse($filename) { - return parent::parse("vfs://core/$filename"); - } - -}