function ExtensionStreamTest::register
Registers test-specific services.
Extend this method in your test to register additional services. This method is called whenever the kernel is rebuilt.
Parameters
\Drupal\Core\DependencyInjection\ContainerBuilder $container: The service container to enhance.
Overrides KernelTestBase::register
File
-
core/
tests/ Drupal/ KernelTests/ Core/ StreamWrapper/ ExtensionStreamTest.php, line 59
Class
- ExtensionStreamTest
- Tests extension stream wrappers.
Namespace
Drupal\KernelTests\Core\StreamWrapperCode
public function register(ContainerBuilder $container) : void {
parent::register($container);
// By default, allow several types of file extensions in this test.
$allowed = [
'css',
'js',
'png',
'yml',
];
$container->setParameter('stream_wrapper.allowed_file_extensions', [
'module' => $allowed,
'theme' => $allowed,
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.