function AnnotatedClassDiscoveryTest::setUp

Same name in this branch
  1. 11.x core/tests/Drupal/KernelTests/Core/Plugin/Discovery/AnnotatedClassDiscoveryTest.php \Drupal\KernelTests\Core\Plugin\Discovery\AnnotatedClassDiscoveryTest::setUp()
Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Plugin/Discovery/AnnotatedClassDiscoveryTest.php \Drupal\KernelTests\Core\Plugin\Discovery\AnnotatedClassDiscoveryTest::setUp()
  2. 9 core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php \Drupal\Tests\Component\Annotation\AnnotatedClassDiscoveryTest::setUp()
  3. 8.9.x core/tests/Drupal/KernelTests/Core/Plugin/Discovery/AnnotatedClassDiscoveryTest.php \Drupal\KernelTests\Core\Plugin\Discovery\AnnotatedClassDiscoveryTest::setUp()
  4. 8.9.x core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php \Drupal\Tests\Component\Annotation\AnnotatedClassDiscoveryTest::setUp()
  5. 10 core/tests/Drupal/KernelTests/Core/Plugin/Discovery/AnnotatedClassDiscoveryTest.php \Drupal\KernelTests\Core\Plugin\Discovery\AnnotatedClassDiscoveryTest::setUp()
  6. 10 core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php \Drupal\Tests\Component\Annotation\AnnotatedClassDiscoveryTest::setUp()

File

core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php, line 22

Class

AnnotatedClassDiscoveryTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Component%21Annotation%21Plugin%21Discovery%21AnnotatedClassDiscovery.php/class/AnnotatedClassDiscovery/11.x" title="Defines a discovery mechanism to find annotated plugins in PSR-4 namespaces." class="local">\Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery</a> @group Annotation @runTestsInSeparateProcesses

Namespace

Drupal\Tests\Component\Annotation

Code

protected function setUp() : void {
    parent::setUp();
    // Ensure the file cache is disabled.
    FileCacheFactory::setConfiguration([
        FileCacheFactory::DISABLE_CACHE => TRUE,
    ]);
    // Ensure that FileCacheFactory has a prefix.
    FileCacheFactory::setPrefix('prefix');
}

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