You are here

protected function YamlDiscoveryTest::setUp in Drupal 9

Same name in this branch
  1. 9 core/tests/Drupal/Tests/Core/Discovery/YamlDiscoveryTest.php \Drupal\Tests\Core\Discovery\YamlDiscoveryTest::setUp()
  2. 9 core/tests/Drupal/Tests/Component/Discovery/YamlDiscoveryTest.php \Drupal\Tests\Component\Discovery\YamlDiscoveryTest::setUp()
  3. 9 core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php \Drupal\Tests\Core\Plugin\Discovery\YamlDiscoveryTest::setUp()
Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php \Drupal\Tests\Core\Plugin\Discovery\YamlDiscoveryTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php, line 35

Class

YamlDiscoveryTest
@coversDefaultClass \Drupal\Core\Plugin\Discovery\YamlDiscovery @group Plugin

Namespace

Drupal\Tests\Core\Plugin\Discovery

Code

protected function setUp() : void {
  parent::setUp();
  $base_path = __DIR__ . '/Fixtures';

  // Set up the directories to search.
  $directories = [
    'test_1' => $base_path . '/test_1',
    'test_2' => $base_path . '/test_2',
  ];
  $this->discovery = new YamlDiscovery('test', $directories);
}