1.20.x views_plugin_style_mapping.test public ViewsPluginStyleMappingTest::testMappedOutput()

Verifies that the fields were mapped correctly.

File

modules/views/tests/styles/views_plugin_style_mapping.test, line 85
Definition of ViewsPluginStyleMappingTest.

Class

ViewsPluginStyleMappingTest
Tests the default/mapping row style.

Code

public function testMappedOutput() {
  $view = $this->getBasicView();
  $output = $this->mappedOutputHelper($view);
  $this->assertTrue(strpos($output, 'job') === FALSE, 'The job field is added to the view but not in the mapping.');

  $view = $this->getBasicView();
  $view->display['default']->display_options['style_options']['mapping']['name_field'] = 'job';
  $output = $this->mappedOutputHelper($view);
  $this->assertTrue(strpos($output, 'job') !== FALSE, 'The job field is added to the view and is in the mapping.');
}