function FieldPluginBaseTest::setUpMockRenderer

Reinitializes the renderer as a mock object.

3 calls to FieldPluginBaseTest::setUpMockRenderer()
FieldPluginBaseTest::testElementClassesWithTokens in core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php
Ensures proper token replacement when generating CSS classes.
FieldPluginBaseTest::testRenderAsExternalLinkWithPathAndTokens in core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php
Tests rendering of a link with a path and options.
FieldPluginBaseTest::testRenderAsLinkWithPathAndTokens in core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php
Tests rendering of a link with a path and options.

File

core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php, line 213

Class

FieldPluginBaseTest
Tests Drupal\views\Plugin\views\field\FieldPluginBase.

Namespace

Drupal\Tests\views\Unit\Plugin\field

Code

protected function setUpMockRenderer() : void {
  $this->renderer = $this->createMock(RendererInterface::class);
  \Drupal::getContainer()->set('renderer', $this->renderer);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.