function AttributeClassDiscoveryTest::setUp
Same name and namespace in other branches
- 10 core/tests/Drupal/Tests/Component/Plugin/Attribute/AttributeClassDiscoveryTest.php \Drupal\Tests\Component\Plugin\Attribute\AttributeClassDiscoveryTest::setUp()
File
-
core/
tests/ Drupal/ Tests/ Component/ Plugin/ Attribute/ AttributeClassDiscoveryTest.php, line 23
Class
- AttributeClassDiscoveryTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Component%21Plugin%21Discovery%21AttributeClassDiscovery.php/class/AttributeClassDiscovery/11.x" title="Defines a discovery mechanism to find plugins with attributes." class="local">\Drupal\Component\Plugin\Discovery\AttributeClassDiscovery</a> @group Attribute @runTestsInSeparateProcesses
Namespace
Drupal\Tests\Component\Plugin\AttributeCode
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');
// Normally the attribute classes would be autoloaded.
include_once __DIR__ . '/Fixtures/CustomPlugin.php';
include_once __DIR__ . '/Fixtures/Plugins/PluginNamespace/AttributeDiscoveryTest1.php';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.