You are here

public function ViewsPluginStyleMappingTest::testMappedOutput in Views (for Drupal 7) 7.3

Verifies that the fields were mapped correctly.

File

tests/styles/views_plugin_style_mapping.test, line 95
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.');
}