You are here

protected function LibraryDependencyResolverTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php \Drupal\Tests\Core\Asset\LibraryDependencyResolverTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php, line 60
Contains \Drupal\Tests\Core\Asset\LibraryDependencyResolverTest.

Class

LibraryDependencyResolverTest
@coversDefaultClass \Drupal\Core\Asset\LibraryDependencyResolver @group Asset

Namespace

Drupal\Tests\Core\Asset

Code

protected function setUp() {
  $this->libraryDiscovery = $this
    ->getMockBuilder('Drupal\\Core\\Asset\\LibraryDiscovery')
    ->disableOriginalConstructor()
    ->setMethods([
    'getLibrariesByExtension',
  ])
    ->getMock();
  $this->libraryDiscovery
    ->expects($this
    ->any())
    ->method('getLibrariesByExtension')
    ->with('test')
    ->will($this
    ->returnValue($this->libraryData));
  $this->libraryDependencyResolver = new LibraryDependencyResolver($this->libraryDiscovery);
}