You are here

public function RestIntegrationTest::setUp in Facets 8

Overrides FacetsTestBase::setUp

File

modules/facets_rest/tests/src/Functional/RestIntegrationTest.php, line 27

Class

RestIntegrationTest
Tests the integration of REST-views and facets.

Namespace

Drupal\Tests\facets_rest\Functional

Code

public function setUp() {
  parent::setUp();

  // Create the users used for the tests.
  $this->adminUser = $this
    ->drupalCreateUser([
    'administer search_api',
    'administer facets',
    'access administration pages',
    'administer nodes',
    'access content overview',
    'administer content types',
    'administer blocks',
    'administer views',
  ]);
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->setUpExampleStructure();
  $this
    ->insertExampleContent();
  $this
    ->assertEquals(5, $this
    ->indexItems($this->indexId), '5 items were indexed.');
}