$this->
assertTrue($style_plugin->
buildSort(), 'If a valid order is specified but the table is configured to not override, the normal sort should be used.'
);
$style_plugin->options
['override'
] = TRUE;
$this->
assertFalse($style_plugin->
buildSort(), 'If a valid order is specified and the table is configured to override, the normal sort should not be used.'
);
// Test the buildSortPost() method.
$request =
new Request();
$view->
setRequest($request);
// Setup no valid default.
$this->
prepareView($view);
$style_plugin =
$view->style_plugin;
$style_plugin->options
['default'
] = '';
$style_plugin->
buildSortPost();
$this->
assertNull($style_plugin->order, 'No sort order was set, when no order was specified and no default column was selected.'
);
$this->
assertNull($style_plugin->active, 'No sort field was set, when no order was specified and no default column was selected.'
);
$view->
destroy();
// Setup a valid default + column specific default sort order.
$this->
prepareView($view);
$style_plugin =
$view->style_plugin;
$style_plugin->options
['default'
] = 'id';