You are here

sbp_test.install in Search by Page 7

Same filename and directory in other branches
  1. 6 tests/sbp_test.install

Install file for Search by Page testing module

File

tests/sbp_test.install
View source
<?php

/**
 * @file
 * Install file for Search by Page testing module
 * @ingroup search_by_page
 */

/**
 * Implements hook_schema().
 *
 * Code taken form the Node Access Example module on drupal.org.
 */
function sbp_test_schema() {
  $schema['sbp_test_access'] = array(
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'private' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  return $schema;
}

/**
 * Makes sure that the body field is added to our content types.
 */
function sbp_test_install() {
  node_types_rebuild();
  $types = node_type_get_types();
  node_add_body_field($types['sbp_indexed']);
  node_add_body_field($types['sbp_hidden']);
}

Related topics

Functions

Namesort descending Description
sbp_test_install Makes sure that the body field is added to our content types.
sbp_test_schema Implements hook_schema().