You are here

protected function DefinitionDiscoveryFactoryTest::setUp in Libraries API 8.3

Overrides BrowserTestBase::setUp

File

tests/src/Functional/ExternalLibrary/Definition/DefinitionDiscoveryFactoryTest.php, line 47

Class

DefinitionDiscoveryFactoryTest
Tests that remote library definitions are found and downloaded.

Namespace

Drupal\Tests\libraries\Functional\ExternalLibrary\Definition

Code

protected function setUp() {
  parent::setUp();

  /** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */
  $config_factory = $this->container
    ->get('config.factory');
  $this->config = $config_factory
    ->getEditable('libraries.settings');

  // Set up the remote library definition URL to point to the local website.

  /** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */
  $module_handler = $this->container
    ->get('module_handler');
  $module_path = $module_handler
    ->getModule('libraries')
    ->getPath();
  $this->definitionPath = "{$module_path}/tests/library_definitions";
}