You are here

public function OauthTokenFileStorageTest::register in Apigee Edge 8

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

See also

\Drupal\Tests\KernelTestBase::bootKernel()

File

tests/src/Kernel/OauthTokenFileStorageTest.php, line 247

Class

OauthTokenFileStorageTest
OAuth cache storage tests.

Namespace

Drupal\Tests\apigee_edge\Kernel

Code

public function register(ContainerBuilder $container) {
  parent::register($container);

  // The private:// scheme is the default scheme used by the token storage
  // therefore it has to be available but we are going to use vfs:// in tests.
  $container
    ->register('stream_wrapper.private', 'Drupal\\Core\\StreamWrapper\\PrivateStream')
    ->addTag('stream_wrapper', [
    'scheme' => 'private',
  ]);
}