function InstallerTranslationDownloadTest::register
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Installer/InstallerTranslationDownloadTest.php \Drupal\KernelTests\Core\Installer\InstallerTranslationDownloadTest::register()
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Installer/ InstallerTranslationDownloadTest.php, line 88
Class
- InstallerTranslationDownloadTest
- Tests that profile translations are downloaded by the installer.
Namespace
Drupal\KernelTests\Core\InstallerCode
public function register(ContainerBuilder $container) : void {
$handler = function (RequestInterface $request) : Response {
$this->requests[] = $request->getMethod() . ' ' . basename($request->getUri()
->getPath());
// We don't care about the response; we're just ensuring that certain
// requests are made.
return new Response(body: "msgid: \"\"\nmsgstr \"\"");
};
$client = new Client([
'handler' => $handler,
]);
$container->set('http_client', $client);
parent::register($container);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.