function LibraryDiscoveryTest::setUp
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php \Drupal\Tests\Core\Asset\LibraryDiscoveryTest::setUp()
- 10 core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php \Drupal\Tests\Core\Asset\LibraryDiscoveryTest::setUp()
- 11.x core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryTest.php \Drupal\Tests\Core\Asset\LibraryDiscoveryTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
tests/ Drupal/ Tests/ Core/ Asset/ LibraryDiscoveryTest.php, line 65
Class
- LibraryDiscoveryTest
- @coversDefaultClass \Drupal\Core\Asset\LibraryDiscovery @group Asset
Namespace
Drupal\Tests\Core\AssetCode
protected function setUp() : void {
parent::setUp();
$this->cacheTagsInvalidator = $this->createMock('Drupal\\Core\\Cache\\CacheTagsInvalidatorInterface');
$this->libraryDiscoveryCollector = $this->getMockBuilder('Drupal\\Core\\Asset\\LibraryDiscoveryCollector')
->disableOriginalConstructor()
->getMock();
$this->libraryDiscovery = new LibraryDiscovery($this->libraryDiscoveryCollector, $this->cacheTagsInvalidator);
$this->libraryDiscoveryCollector
->expects($this->once())
->method('get')
->with('test')
->willReturn($this->libraryData);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.