You are here

public function SortableviewsAccessTest::dataProvider in Sortableviews 8

Provides test data for testAccess().

File

tests/src/Unit/Access/SortableviewsAccessTest.php, line 114

Class

SortableviewsAccessTest
@coversDefaultClass \Drupal\sortableviews\Access\SortableviewsAccess @group sortableviews

Namespace

Drupal\Tests\sortableviews\Unit\Access

Code

public function dataProvider() {
  $data = [];
  $request = new Request();
  $data[] = [
    $request,
    FALSE,
  ];
  unset($request);
  $request = new Request();
  $request->attributes
    ->set('view_name', 'some_view');
  $request->attributes
    ->set('display_name', uniqid());
  $request->attributes
    ->set('current_order', [
    1,
    2,
  ]);
  $data[] = [
    $request,
    TRUE,
  ];
  unset($request);
  return $data;
}