function ConfigTest::setUp
Same name in this branch
- 11.x core/modules/system/tests/src/Functional/File/ConfigTest.php \Drupal\Tests\system\Functional\File\ConfigTest::setUp()
Same name in other branches
- 9 core/modules/system/tests/src/Functional/File/ConfigTest.php \Drupal\Tests\system\Functional\File\ConfigTest::setUp()
- 9 core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::setUp()
- 8.9.x core/modules/system/tests/src/Functional/File/ConfigTest.php \Drupal\Tests\system\Functional\File\ConfigTest::setUp()
- 8.9.x core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::setUp()
- 10 core/modules/system/tests/src/Functional/File/ConfigTest.php \Drupal\Tests\system\Functional\File\ConfigTest::setUp()
- 10 core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ ConfigTest.php, line 62
Class
- ConfigTest
- Tests the Config.
Namespace
Drupal\Tests\Core\ConfigCode
protected function setUp() : void {
parent::setUp();
$this->storage = $this->createMock('Drupal\\Core\\Config\\StorageInterface');
$this->eventDispatcher = $this->createMock('Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface');
$this->typedConfig = $this->createMock('\\Drupal\\Core\\Config\\TypedConfigManagerInterface');
$this->config = new Config('config.test', $this->storage, $this->eventDispatcher, $this->typedConfig);
$this->cacheTagsInvalidator = $this->createMock('Drupal\\Core\\Cache\\CacheTagsInvalidatorInterface');
$container = new ContainerBuilder();
$container->set('cache_tags.invalidator', $this->cacheTagsInvalidator);
\Drupal::setContainer($container);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.