function ExcludedFieldTokenTest::testExcludedTitleTokenDisplay
Same name in other branches
- 8.9.x core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php \Drupal\Tests\rest\Functional\Views\ExcludedFieldTokenTest::testExcludedTitleTokenDisplay()
- 10 core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php \Drupal\Tests\rest\Functional\Views\ExcludedFieldTokenTest::testExcludedTitleTokenDisplay()
- 11.x core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php \Drupal\Tests\rest\Functional\Views\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 70
Class
- ExcludedFieldTokenTest
- Tests the display of an excluded field that is used as a token.
Namespace
Drupal\Tests\rest\Functional\ViewsCode
public function testExcludedTitleTokenDisplay() {
$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.