*
* @var array
*/
- public static $testViews = ['test_destroy', 'test_executable_displays'];
+ public static $testViews = ['test_destroy', 'test_executable_displays', 'test_argument_dependency'];
/**
* Properties that should be stored in the configuration.
// Test the initStyle() method.
$view->initStyle();
$this->assertTrue($view->style_plugin instanceof DefaultStyle, 'Make sure a reference to the style plugin is set.');
- // Test the plugin has been inited and view have references to the view and
+ // Test the plugin has been invited and view have references to the view and
// display handler.
$this->assertEqual(spl_object_hash($view->style_plugin->view), $view_hash);
$this->assertEqual(spl_object_hash($view->style_plugin->displayHandler), $display_hash);
$this->assertEquals($nid_definition_before->getPropertyDefinitions(), $nid_definition_after->getPropertyDefinitions());
}
+ /**
+ * Tests if argument overrides by validators are propagated to tokens.
+ */
+ 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']);
+ }
+
}