You are here

protected function ViewsSqlTest::dataSet in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 7.3 tests/views_query.test \ViewsSqlTest::dataSet()

A very simple test dataset.

1 call to ViewsSqlTest::dataSet()
ViewsSqlTest::setUp in tests/views_query.test
Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…

File

tests/views_query.test, line 289
Tests for Views query features.

Class

ViewsSqlTest

Code

protected function dataSet() {
  return array(
    array(
      'name' => 'John',
      'age' => 25,
      'job' => 'Singer',
      'created' => gmmktime(0, 0, 0, 1, 1, 2000),
    ),
    array(
      'name' => 'George',
      'age' => 27,
      'job' => 'Singer',
      'created' => gmmktime(0, 0, 0, 1, 2, 2000),
    ),
    array(
      'name' => 'Ringo',
      'age' => 28,
      'job' => 'Drummer',
      'created' => gmmktime(6, 30, 30, 1, 1, 2000),
    ),
    array(
      'name' => 'Paul',
      'age' => 26,
      'job' => 'Songwriter',
      'created' => gmmktime(6, 0, 0, 1, 1, 2000),
    ),
    array(
      'name' => 'Meredith',
      'age' => 30,
      'job' => 'Speaker',
      'created' => gmmktime(6, 30, 10, 1, 1, 2000),
    ),
  );
}