You are here

public function SchedulerSetupTrait::dataStandardEntityTypes in Scheduler 2.x

Provides test data containing the standard entity types.

Return value

array Each array item has the values: [entity type id, bundle id]. The array key is #entity_type_id, to allow easy removal of unwanted rows later.

7 calls to SchedulerSetupTrait::dataStandardEntityTypes()
SchedulerEntityAccessTest::dataEntityAccess in tests/src/Functional/SchedulerEntityAccessTest.php
Provides data for testEntityAccess.
SchedulerEventsTest::dataSchedulerEvents in tests/src/Functional/SchedulerEventsTest.php
Provides test data for scheduler events test.
SchedulerJavascriptDefaultTimeTest::dataTimeWhenSchedulingIsRequired in tests/src/FunctionalJavascript/SchedulerJavascriptDefaultTimeTest.php
Provides data for testTimeWhenSchedulingIsRequired().
SchedulerNonEnabledTypeTest::dataNonEnabledType in tests/src/Functional/SchedulerNonEnabledTypeTest.php
Provides data for testNonEnabledType().
SchedulerPermissionsTest::dataPermissionsTest in tests/src/Functional/SchedulerPermissionsTest.php
Provides data for testUserPermissionsAdd() and testUserPermissionsEdit()

... See full list

File

tests/src/Traits/SchedulerSetupTrait.php, line 411

Class

SchedulerSetupTrait
Generic setup for all Scheduler tests.

Namespace

Drupal\Tests\scheduler\Traits

Code

public function dataStandardEntityTypes() {

  // The data provider has access to $this where the values are set in the
  // property definition.
  $data = [
    '#node' => [
      'node',
      $this->type,
    ],
    '#media' => [
      'media',
      $this->mediaTypeName,
    ],
    '#commerce_product' => [
      'commerce_product',
      $this->productTypeName,
    ],
  ];
  return $data;
}