You are here

protected function ViewsAccordionTest::setUp in Views Accordion 8

Same name in this branch
  1. 8 tests/src/Functional/ViewsAccordionTest.php \Drupal\Tests\views_accordion\Functional\ViewsAccordionTest::setUp()
  2. 8 tests/src/FunctionalJavascript/ViewsAccordionTest.php \Drupal\Tests\views_accordion\FunctionalJavascript\ViewsAccordionTest::setUp()
Same name and namespace in other branches
  1. 2.0.x tests/src/FunctionalJavascript/ViewsAccordionTest.php \Drupal\Tests\views_accordion\FunctionalJavascript\ViewsAccordionTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/FunctionalJavascript/ViewsAccordionTest.php, line 47

Class

ViewsAccordionTest
Tests the JavaScript functionality of the Views Accordion module.

Namespace

Drupal\Tests\views_accordion\FunctionalJavascript

Code

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

  // Create a set of users and nodes for testing.
  $this->user1 = $this
    ->createUser();
  $this->user2 = $this
    ->createUser();

  // Test view views_accordion_test_grouping is set to group by uid.
  $this->nodes[] = $this
    ->createNode([
    'uid' => $this->user1
      ->id(),
  ]);
  $this->nodes[] = $this
    ->createNode([
    'uid' => $this->user1
      ->id(),
  ]);
  $this->nodes[] = $this
    ->createNode([
    'uid' => $this->user2
      ->id(),
  ]);
  $this->nodes[] = $this
    ->createNode([
    'uid' => $this->user2
      ->id(),
  ]);
}