You are here

protected function SchedulerUiTrait::assertTransitionData in Lightning Scheduler 8

Asserts that a set of transitions is present.

Parameters

string $field: The hidden field which contains the transitions.

array[] $data: The scheduled transitions.

1 call to SchedulerUiTrait::assertTransitionData()
InlineEntityFormTest::testHostEntityWithModeration in tests/src/Functional/InlineEntityFormTest.php
@depends testHostEntityWithoutModeration

File

tests/src/Traits/SchedulerUiTrait.php, line 91

Class

SchedulerUiTrait
Contains methods for interacting with the scheduler UI.

Namespace

Drupal\Tests\lightning_scheduler\Traits

Code

protected function assertTransitionData($field, array $data) {
  array_walk($data, function (array &$transition) {
    $transition['when'] = gmdate('c', $transition['when']);
  });
  $this
    ->assertSession()
    ->hiddenFieldValueEquals($field, Json::encode($data));
}