You are here

function ContentMigrateTestCase::setUp in Content Construction Kit (CCK) 7.3

In the base setUp() method we need to create a content type, and Drupal 6 tables relating to CCK: content_node_field, content_node_field_instance, and content_type_TYPENAME. It is up to a child class to make the proper inserts into these tables.

Overrides DrupalWebTestCase::setUp

2 calls to ContentMigrateTestCase::setUp()
ContentMigrateListTestCase::setUp in modules/content_migrate/tests/content_migrate.test
In the base setUp() method we need to create a content type, and Drupal 6 tables relating to CCK: content_node_field, content_node_field_instance, and content_type_TYPENAME. It is up to a child class to make the proper inserts into these tables.
ContentMigrateTextTestCase::setUp in modules/content_migrate/tests/content_migrate.test
In the base setUp() method we need to create a content type, and Drupal 6 tables relating to CCK: content_node_field, content_node_field_instance, and content_type_TYPENAME. It is up to a child class to make the proper inserts into these tables.
2 methods override ContentMigrateTestCase::setUp()
ContentMigrateListTestCase::setUp in modules/content_migrate/tests/content_migrate.test
In the base setUp() method we need to create a content type, and Drupal 6 tables relating to CCK: content_node_field, content_node_field_instance, and content_type_TYPENAME. It is up to a child class to make the proper inserts into these tables.
ContentMigrateTextTestCase::setUp in modules/content_migrate/tests/content_migrate.test
In the base setUp() method we need to create a content type, and Drupal 6 tables relating to CCK: content_node_field, content_node_field_instance, and content_type_TYPENAME. It is up to a child class to make the proper inserts into these tables.

File

modules/content_migrate/tests/content_migrate.test, line 20
Content Migrate Test Cases

Class

ContentMigrateTestCase
@class Content Migrate Test Case. You should use this as the parent class for your content migrate tests.

Code

function setUp() {
  parent::setUp('field', 'field_ui', 'content_migrate');

  // We need a content type. We don't need nodes. We'll leave that
  // to actual tests.
  $this->content_type = $this
    ->drupalCreateContentType(array());

  // We need to setup Drupal 6 CCK tables.
  $schema = $this
    ->contentDrupal6Schema();
  _drupal_schema_initialize($schema, 'content_migrate', TRUE);
  foreach ($schema as $name => $table) {
    db_create_table($name, $table);

    // Whoopie~
    $this
      ->assertTrue(db_table_exists($name), t('Table %table exists.', array(
      '%table' => $name,
    )));
  }

  // Create an admin user.
  $this->admin_user = $this
    ->drupalCreateUser(array(
    'bypass node access',
    'administer content types',
    'administer nodes',
  ));
}