function EntityTest::providerTestTokens

Same name and namespace in other branches
  1. 9 core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php \Drupal\Tests\views\Unit\Plugin\area\EntityTest::providerTestTokens()
  2. 8.9.x core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php \Drupal\Tests\views\Unit\Plugin\area\EntityTest::providerTestTokens()
  3. 10 core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php \Drupal\Tests\views\Unit\Plugin\area\EntityTest::providerTestTokens()

Data provider for testing different types of tokens.

Return value

array

File

core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php, line 146

Class

EntityTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21views%21src%21Plugin%21views%21area%21Entity.php/class/Entity/11.x" title="Provides an area handler which renders an entity in a certain view mode." class="local">\Drupal\views\Plugin\views\area\Entity</a> @group Entity

Namespace

Drupal\Tests\views\Unit\Plugin\area

Code

public static function providerTestTokens() {
    return [
        [
            '{{ raw_arguments.test1 }}',
            5,
        ],
        [
            '{{ arguments.test2 }}',
            6,
        ],
        [
            '{{ test_render_token }}',
            7,
        ],
        [
            '{{ test:global_token }}',
            8,
        ],
    ];
}

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