merge-requests/1071/head
parent
7d95d0893e
commit
30fc03b1a2
|
@ -4,9 +4,7 @@ namespace Drupal\KernelTests\Core\Theme;
|
||||||
|
|
||||||
use Drupal\Core\DependencyInjection\ContainerBuilder;
|
use Drupal\Core\DependencyInjection\ContainerBuilder;
|
||||||
use Drupal\Core\Extension\ExtensionDiscovery;
|
use Drupal\Core\Extension\ExtensionDiscovery;
|
||||||
use Drupal\Core\Extension\InfoParser;
|
|
||||||
use Drupal\Core\Extension\InfoParserException;
|
use Drupal\Core\Extension\InfoParserException;
|
||||||
use Drupal\Core\Extension\InfoParserInterface;
|
|
||||||
use Drupal\Core\Extension\ThemeExtensionList;
|
use Drupal\Core\Extension\ThemeExtensionList;
|
||||||
use Drupal\KernelTests\KernelTestBase;
|
use Drupal\KernelTests\KernelTestBase;
|
||||||
use org\bovigo\vfs\vfsStream;
|
use org\bovigo\vfs\vfsStream;
|
||||||
|
@ -71,8 +69,7 @@ class BaseThemeMissingTest extends KernelTestBase {
|
||||||
*/
|
*/
|
||||||
public function testMissingBaseThemeException() {
|
public function testMissingBaseThemeException() {
|
||||||
$this->container->get('extension.list.theme')
|
$this->container->get('extension.list.theme')
|
||||||
->setExtensionDiscovery(new ExtensionDiscovery('vfs://core'))
|
->setExtensionDiscovery(new ExtensionDiscovery('vfs://core'));
|
||||||
->setInfoParser(new VfsInfoParser('vfs:/'));
|
|
||||||
|
|
||||||
$this->expectException(InfoParserException::class);
|
$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');
|
$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 @@ class VfsThemeExtensionList extends ThemeExtensionList {
|
||||||
return $this;
|
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}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -127,14 +111,3 @@ class VfsThemeExtensionList extends ThemeExtensionList {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class VfsInfoParser extends InfoParser {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function parse($filename) {
|
|
||||||
return parent::parse("vfs://core/$filename");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue