function ExcludedFieldTokenTest::testExcludedTitleTokenDisplay
Tests the display of an excluded title field when used as a token.
File
- 
              core/
modules/ rest/ tests/ src/ Functional/ Views/ ExcludedFieldTokenTest.php, line 75  
Class
- ExcludedFieldTokenTest
 - Tests the display of an excluded field that is used as a token.
 
Namespace
Drupal\Tests\rest\Functional\ViewsCode
public function testExcludedTitleTokenDisplay() : void {
  $actual_json = $this->drupalGet($this->view
    ->getPath(), [
    'query' => [
      '_format' => 'json',
    ],
  ]);
  $this->assertSession()
    ->statusCodeEquals(200);
  $expected = [
    [
      'nothing' => 'Article test 10',
    ],
    [
      'nothing' => 'Article test 9',
    ],
    [
      'nothing' => 'Article test 8',
    ],
    [
      'nothing' => 'Article test 7',
    ],
    [
      'nothing' => 'Article test 6',
    ],
    [
      'nothing' => 'Article test 5',
    ],
    [
      'nothing' => 'Article test 4',
    ],
    [
      'nothing' => 'Article test 3',
    ],
    [
      'nothing' => 'Article test 2',
    ],
    [
      'nothing' => 'Article test 1',
    ],
  ];
  $this->assertSame(json_encode($expected), $actual_json);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.