protected function TwigExtensionTest::setUp in Drupal 10
Same name in this branch
- 10 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()
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php \Drupal\Tests\Core\Template\TwigExtensionTest::setUp()
- 9 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
protected 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);
}