You are here

protected function CommerceReportsBaseTestCase::getView in Commerce Reporting 7.4

Return a an executed View.

Parameters

$name:

$id:

Return value

\view

1 call to CommerceReportsBaseTestCase::getView()
CommerceReportsViewsExportTestCase::getRenderedExport in src/Tests/CommerceReportsViewsExportTestCase.php

File

src/Tests/CommerceReportsBaseTestCase.php, line 212

Class

CommerceReportsBaseTestCase
Class CommerceReportsBaseTestCase

Namespace

Drupal\commerce_reports\Tests

Code

protected function getView($name, $id) {
  $view = views_get_view($name, TRUE);
  $view
    ->set_arguments(array());
  $view
    ->set_display(array(
    $id,
  ));
  $view
    ->pre_execute();
  $view
    ->execute($id);
  return $view;
}