[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/data/tests/ -> data.test.inc (source)

   1  <?php
   2  /**
   3   * @file
   4   * Contains class definition for Data module test cases.
   5   */
   6  
   7  /**
   8   * Base class for Data module test cases.
   9   */
  10  class DataTestCase extends DrupalWebTestCase {
  11    
  12    /**
  13     * Return a test schema.
  14     */
  15    protected function testSchema() {
  16      return array(
  17        'fields' => array(
  18          'id' => array(
  19            'type' => 'int',
  20            'unsigned' => TRUE,
  21            'not null' => TRUE,
  22          ),
  23          'char0' => array(
  24            'type' => 'varchar',
  25            'length' => '255',
  26            'not null' => FALSE,
  27            'default' => '',
  28          ),
  29          'char1' => array(
  30            'type' => 'varchar',
  31            'length' => '255',
  32            'not null' => FALSE,
  33            'default' => '',
  34          ),
  35        ),
  36        'indexes' => array(
  37          'id' => array('id'),
  38         ),
  39      );
  40    }
  41  
  42    /**
  43     * Test data.
  44     */
  45    protected function testData() {
  46      return array(
  47        0 => array(
  48          'id' => 0,
  49          'char0' => 'test00',
  50          'char1' => 'test01',
  51        ),
  52        1 => array(
  53          'id' => 1,
  54          'char0' => 'test10',
  55          'char1' => 'test11',
  56        ),
  57      );
  58    }
  59  }


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7