function LibraryDiscoveryParserTest::setUpMockStreamWrapperManager

Reinitializes the stream wrapper manager as a mock object.

1 call to LibraryDiscoveryParserTest::setUpMockStreamWrapperManager()
LibraryDiscoveryParserTest::testLibraryWithDataTypes in core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php
Tests a library with a couple of data formats like full URL.

File

core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php, line 136

Class

LibraryDiscoveryParserTest
Tests Drupal\Core\Asset\LibraryDiscoveryParser.

Namespace

Drupal\Tests\Core\Asset

Code

protected function setUpMockStreamWrapperManager() : void {
  $this->streamWrapperManager = $this->createMock(StreamWrapperManagerInterface::class);
  $reflection = new \ReflectionProperty($this->libraryDiscoveryParser, 'streamWrapperManager');
  $reflection->setValue($this->libraryDiscoveryParser, $this->streamWrapperManager);
}

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