public function ExcludedFieldTokenTest::testExcludedTitleTokenDisplay in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rest/tests/src/Functional/Views/ExcludedFieldTokenTest.php \Drupal\Tests\rest\Functional\Views\ExcludedFieldTokenTest::testExcludedTitleTokenDisplay()
- 9 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);
}