function GetFilenameTest::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/Bootstrap/GetFilenameTest.php, line 23

Class

GetFilenameTest
Tests that drupal_get_filename() works correctly.

Namespace

Drupal\KernelTests\Core\Bootstrap

Code

public function register(ContainerBuilder $container) {
    parent::register($container);
    // Use the testing install profile.
    $container->setParameter('install_profile', 'testing');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.