home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (views_handlers.test)

This example Drupal source code file (views_handlers.test) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

admin_user, array, definitions, description, edit, extends, function, path, php, return, static, true, views, viewshandlerstest

The views_handlers.test Drupal example source code

<?php
// $Id: views_handlers.test,v 1.1.4.4 2010/05/24 19:58:36 dereine Exp $

/**
* @file
* Test abstract handlers of views
*/

class ViewsHandlersTest extends ViewsSqlTest {
  public static function getInfo() {
    return array(
      'name' => t('Handlers test'),
      'description' => t('test abstract handler definitions'),
      'group' => 'Views',
    );
  }

  function setUp() {
    parent::setUp('views', 'views_ui');
    module_enable(array('views_ui'));
  }

  function testFilterInOperatorUi() {
    $admin_user = $this->drupalCreateUser(array('administer views', 'administer site configuration'));
    $this->drupalLogin($admin_user);
    menu_rebuild();

    $path = 'admin/structure/views/nojs/config-item/test_filter_in_operator_ui/default/filter/type';
    $this->drupalGet($path);
    $this->assertFieldByName('options[expose][reduce]', FALSE);

    $edit = array(
      'options[expose][reduce]' => TRUE,
    );
    $this->drupalPost($path, $edit, t('Update'));
    $this->drupalGet($path);
    $this->assertFieldByName('options[expose][reduce]', TRUE);
  }
}

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal views_handlers.test source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.