You are here

protected function SchedulerBrowserTestBase::setUp in Scheduler 2.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/SchedulerBrowserTestBase.php \Drupal\Tests\scheduler\Functional\SchedulerBrowserTestBase::setUp()

Overrides BrowserTestBase::setUp

11 calls to SchedulerBrowserTestBase::setUp()
SchedulerDefaultTimeTest::setUp in tests/src/Functional/SchedulerDefaultTimeTest.php
SchedulerDevelGenerateTest::setUp in tests/src/Functional/SchedulerDevelGenerateTest.php
SchedulerFieldsDisplayTest::setUp in tests/src/Functional/SchedulerFieldsDisplayTest.php
SchedulerHooksLegacyTest::setUp in tests/src/Functional/SchedulerHooksLegacyTest.php
SchedulerHooksTest::setUp in tests/src/Functional/SchedulerHooksTest.php

... See full list

11 methods override SchedulerBrowserTestBase::setUp()
SchedulerDefaultTimeTest::setUp in tests/src/Functional/SchedulerDefaultTimeTest.php
SchedulerDevelGenerateTest::setUp in tests/src/Functional/SchedulerDevelGenerateTest.php
SchedulerFieldsDisplayTest::setUp in tests/src/Functional/SchedulerFieldsDisplayTest.php
SchedulerHooksLegacyTest::setUp in tests/src/Functional/SchedulerHooksLegacyTest.php
SchedulerHooksTest::setUp in tests/src/Functional/SchedulerHooksTest.php

... See full list

File

tests/src/Functional/SchedulerBrowserTestBase.php, line 48

Class

SchedulerBrowserTestBase
Base class to provide common browser test setup.

Namespace

Drupal\Tests\scheduler\Functional

Code

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

  // Call the common set-up functions defined in the traits.
  $this
    ->schedulerSetUp();

  // $this->getName() includes the test class and the dataProvider key. We can
  // use this to save time and resources by avoiding calls to the media and
  // product setup functions when they are not needed. The exception is the
  // permissions tests, which use all entities for all tests.
  $testName = $this
    ->getName();
  if (stristr($testName, 'media') || stristr($testName, 'permission')) {
    $this
      ->schedulerMediaSetUp();
  }
  if (stristr($this
    ->getName(), 'product') || stristr($testName, 'permission')) {
    $this
      ->SchedulerCommerceProductSetUp();
  }
}