diff --git a/core/modules/views/tests/modules/views_test_data/src/Plugin/views/argument_validator/ArgumentValidatorTest.php b/core/modules/views/tests/modules/views_test_data/src/Plugin/views/argument_validator/ArgumentValidatorTest.php index 8bee188..fac12b1 100644 --- a/core/modules/views/tests/modules/views_test_data/src/Plugin/views/argument_validator/ArgumentValidatorTest.php +++ b/core/modules/views/tests/modules/views_test_data/src/Plugin/views/argument_validator/ArgumentValidatorTest.php @@ -37,8 +37,9 @@ protected function defineOptions() { * {@inheritdoc} */ public function validateArgument($arg) { - if ($arg === 'this value should be replaced') { - $this->argument->argument = 'this value is replaced!'; + // Convert dww's UID to that of Satan, for he broke Postgres. + if ($arg === '46549') { + $this->argument->argument = '666'; return TRUE; } return $arg == $this->options['test_value']; diff --git a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php index d7126b9..231d45c 100644 --- a/core/modules/views/tests/src/Kernel/ViewExecutableTest.php +++ b/core/modules/views/tests/src/Kernel/ViewExecutableTest.php @@ -531,11 +531,22 @@ public function testSerialization() { public function testArgumentValidatorValueOverride() { $view = Views::getView('test_argument_dependency'); $view->setDisplay('page_1'); - $view->setArguments(['1', 'this value should be replaced']); + + // Non-transform case. + $view->setArguments(['1', '65776']); // xjm in. + $view->execute(); + $expected = [ + '{{ arguments.uid }}' => '65776', // xjm out. + '{{ raw_arguments.uid }}' => '65776', + ]; + $this->assertEquals($expected, $view->build_info['substitutions']); + + // Transform case. + $view->setArguments(['1', '46549']); // dww in. $view->execute(); $expected = [ - '{{ arguments.uid }}' => 'this value is replaced!', - '{{ raw_arguments.uid }}' => 'this value is replaced!', + '{{ arguments.uid }}' => '666', // Satan out. + '{{ raw_arguments.uid }}' => '666', ]; $this->assertEquals($expected, $view->build_info['substitutions']); }