function FieldPluginBaseTest::testGetRenderTokensWithQuery
Same name in other branches
- 10 core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\field\FieldPluginBaseTest::testGetRenderTokensWithQuery()
@dataProvider providerTestGetRenderTokensWithQuery @covers ::getRenderTokens @covers ::getTokenValuesRecursive
File
-
core/
modules/ views/ tests/ src/ Unit/ Plugin/ field/ FieldPluginBaseTest.php, line 718
Class
- FieldPluginBaseTest
- @coversDefaultClass \Drupal\views\Plugin\views\field\FieldPluginBase @group views
Namespace
Drupal\Tests\views\Unit\Plugin\fieldCode
public function testGetRenderTokensWithQuery(array $query_params, array $expected) : void {
$request = new Request($query_params);
$this->executable
->expects($this->any())
->method('getRequest')
->willReturn($request);
$field = $this->setupTestField([
'id' => 'id',
]);
$field->last_render = 'last rendered output';
$this->display
->expects($this->any())
->method('getHandlers')
->willReturnMap([
[
'argument',
[],
],
[
'field',
[
'id' => $field,
],
],
]);
$this->assertEquals($expected, $field->getRenderTokens([]));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.