You are here

protected function SchedulerUiTrait::setTransitionData in Lightning Scheduler 8

Sets the scheduled transition data.

Parameters

string $field: The hidden field in which to store the transitions.

array[] $data: The scheduled transitions.

5 calls to SchedulerUiTrait::setTransitionData()
InlineEntityFormTest::testHostEntityWithModeration in tests/src/Functional/InlineEntityFormTest.php
@depends testHostEntityWithoutModeration
ScheduledTransitionTest::testFutureSequence in tests/src/Functional/ScheduledTransitionTest.php
Tests scheduling a series of valid transitions in the future.
ScheduledTransitionTest::testInvalidPastSequence in tests/src/Functional/ScheduledTransitionTest.php
Tests that a sequence that works in the future may not work in the past.
ScheduledTransitionTest::testSingleTransition in tests/src/Functional/ScheduledTransitionTest.php
Tests a single scheduled workflow state transition.
ScheduledTransitionTest::testSingleTransitionWithPendingRevision in tests/src/Functional/ScheduledTransitionTest.php
Tests that scheduled transitions work correctly with pending revisions.

File

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

Class

SchedulerUiTrait
Contains methods for interacting with the scheduler UI.

Namespace

Drupal\Tests\lightning_scheduler\Traits

Code

protected function setTransitionData($field, array $data) {
  $data = Json::encode($data);
  $this
    ->assertSession()
    ->hiddenFieldExists($field)
    ->setValue($data);
}