You are here

public function ScheduledTransitionEntityTest::testScheduledRevision in Scheduled Transitions 2.x

Same name and namespace in other branches
  1. 8 tests/src/Kernel/ScheduledTransitionEntityTest.php \Drupal\Tests\scheduled_transitions\Kernel\ScheduledTransitionEntityTest::testScheduledRevision()

Tests getEntityRevisionLanguage method.

@covers ::getEntityRevisionLanguage

File

tests/src/Kernel/ScheduledTransitionEntityTest.php, line 44

Class

ScheduledTransitionEntityTest
Tests scheduled transition entity.

Namespace

Drupal\Tests\scheduled_transitions\Kernel

Code

public function testScheduledRevision() {
  $langCode = 'foobar';
  $scheduledTransition = ScheduledTransition::create([
    'entity_revision_langcode' => $langCode,
  ]);
  $this
    ->assertEquals($langCode, $scheduledTransition
    ->getEntityRevisionLanguage());
}