5 * Definition of ViewsHandlerFieldCustomTest.
9 * Tests the core views_handler_field_custom handler.
11 class ViewsHandlerFieldCustomTest extends ViewsSqlTest {
12 public static function getInfo() {
14 'name' => 'Field: Custom',
15 'description' => 'Test the core views_handler_field_custom handler.',
16 'group' => 'Views Handlers',
20 function viewsData() {
21 $data = parent::viewsData();
22 $data['views_test']['name']['field']['handler'] = 'views_handler_field_custom';
26 public function testFieldCustom() {
27 $view = $this->getBasicView();
29 // Alter the text of the field to a random string.
30 $random = $this->randomName();
31 $view->display['default']->handler->override_option('fields', array(
34 'table' => 'views_test',
36 'relationship' => 'none',
43 $this->executeView($view);
45 $this->assertEqual($random, $view->style_plugin->get_field(0, 'name'));