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