function TwigExtensionTest::setUp
Same name in this branch
- 9 core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php \Drupal\Tests\system\Functional\Theme\TwigExtensionTest::setUp()
Same name in other branches
- 8.9.x core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php \Drupal\Tests\system\Functional\Theme\TwigExtensionTest::setUp()
- 8.9.x core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php \Drupal\Tests\Core\Template\TwigExtensionTest::setUp()
- 10 core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php \Drupal\Tests\system\Functional\Theme\TwigExtensionTest::setUp()
- 10 core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php \Drupal\Tests\Core\Template\TwigExtensionTest::setUp()
- 11.x core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php \Drupal\Tests\system\Functional\Theme\TwigExtensionTest::setUp()
- 11.x core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php \Drupal\Tests\Core\Template\TwigExtensionTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
tests/ Drupal/ Tests/ Core/ Template/ TwigExtensionTest.php, line 74
Class
- TwigExtensionTest
- Tests the twig extension.
Namespace
Drupal\Tests\Core\TemplateCode
public function setUp() : void {
parent::setUp();
$this->renderer = $this->createMock('\\Drupal\\Core\\Render\\RendererInterface');
$this->urlGenerator = $this->createMock('\\Drupal\\Core\\Routing\\UrlGeneratorInterface');
$this->themeManager = $this->createMock('\\Drupal\\Core\\Theme\\ThemeManagerInterface');
$this->dateFormatter = $this->createMock('\\Drupal\\Core\\Datetime\\DateFormatterInterface');
$this->fileUrlGenerator = $this->createMock(FileUrlGeneratorInterface::class);
$this->systemUnderTest = new TwigExtension($this->renderer, $this->urlGenerator, $this->themeManager, $this->dateFormatter, $this->fileUrlGenerator);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.