You are here

public function BasicTest::testSimpleResultSet in Views (for Drupal 7) 8.3

Tests a trivial result set.

File

lib/Drupal/views/Tests/BasicTest.php, line 32
Definition of Drupal\views\Tests\BasicTest.

Class

BasicTest
Basic test class for Views query builder tests.

Namespace

Drupal\views\Tests

Code

public function testSimpleResultSet() {
  $view = $this
    ->getView();

  // Execute the view.
  $this
    ->executeView($view);

  // Verify the result.
  $this
    ->assertEqual(5, count($view->result), t('The number of returned rows match.'));
  $this
    ->assertIdenticalResultset($view, $this
    ->dataSet(), array(
    'views_test_data_name' => 'name',
    'views_test_data_age' => 'age',
  ));
}