public function ViewExecutableTest::testArgumentValidatorValueOverride in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Kernel/ViewExecutableTest.php \Drupal\Tests\views\Kernel\ViewExecutableTest::testArgumentValidatorValueOverride()
- 10 core/modules/views/tests/src/Kernel/ViewExecutableTest.php \Drupal\Tests\views\Kernel\ViewExecutableTest::testArgumentValidatorValueOverride()
Tests if argument overrides by validators are propagated to tokens.
File
- core/
modules/ views/ tests/ src/ Kernel/ ViewExecutableTest.php, line 541
Class
- ViewExecutableTest
- Tests the ViewExecutable class.
Namespace
Drupal\Tests\views\KernelCode
public function testArgumentValidatorValueOverride() {
$view = Views::getView('test_argument_dependency');
$view
->setDisplay('page_1');
$view
->setArguments([
'1',
'this value should be replaced',
]);
$view
->execute();
$expected = [
'{{ arguments.uid }}' => '1',
'{{ raw_arguments.uid }}' => '1',
];
$this
->assertEquals($expected, $view->build_info['substitutions']);
}