protected function ViewsSqlTest::dataSet

3.x views_query.test protected ViewsSqlTest::dataSet()

A very simple test dataset.

14 calls to ViewsSqlTest::dataSet()
ViewsBasicTest::testSimpleArgument in tests/views_basic.test
Tests simple argument.
ViewsBasicTest::testSimpleResultSet in tests/views_basic.test
Tests a trivial result set.
ViewsHandlerFieldBooleanTest::dataSet in tests/handlers/views_handler_field_boolean.test
A very simple test dataset.
ViewsHandlerFieldDateTest::dataSet in tests/handlers/views_handler_field_date.test
Appends dataSet() with a data row for "today time ago" format testing.
ViewsHandlerFileExtensionTest::dataSet in tests/handlers/views_handler_field_file_extension.test
A very simple test dataset.

... See full list

7 methods override ViewsSqlTest::dataSet()
ViewsHandlerFieldBooleanTest::dataSet in tests/handlers/views_handler_field_boolean.test
A very simple test dataset.
ViewsHandlerFieldDateTest::dataSet in tests/handlers/views_handler_field_date.test
Appends dataSet() with a data row for "today time ago" format testing.
ViewsHandlerFileExtensionTest::dataSet in tests/handlers/views_handler_field_file_extension.test
A very simple test dataset.
ViewsHandlerFilterCombineTest::dataSet in tests/handlers/views_handler_filter_combine.test
Additional data to test the NULL issue.
ViewsHandlerFilterStringTest::dataSet in tests/handlers/views_handler_filter_string.test
An extended test dataset.

... See full list

File

tests/views_query.test, line 325
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),
    ),
  );
}