Tests the exclude setting.
public function testExclude() {
$view = views_get_view('test_field_output');
$view
->initHandlers();
// Hide the field and see whether it's rendered.
$view->field['name']->options['exclude'] = TRUE;
$output = $view
->preview();
foreach ($this
->dataSet() as $entry) {
$this
->assertNotSubString($output, $entry['name']);
}
// Show and check the field.
$view->field['name']->options['exclude'] = FALSE;
$output = $view
->preview();
foreach ($this
->dataSet() as $entry) {
$this
->assertSubString($output, $entry['name']);
}
}