function ViewsPluginStyleMappingTest::testMappedOutput

Verifies that the fields were mapped correctly.

File

tests/styles/views_plugin_style_mapping.test, line 101

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.');
}