ScheduledTransitionEntityTest.php in Scheduled Transitions 2.x
File
tests/src/Kernel/ScheduledTransitionEntityTest.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Tests\scheduled_transitions\Kernel;
use Drupal\KernelTests\KernelTestBase;
use Drupal\scheduled_transitions\Entity\ScheduledTransition;
class ScheduledTransitionEntityTest extends KernelTestBase {
protected static $modules = [
'scheduled_transitions',
'dynamic_entity_reference',
'content_moderation',
'workflows',
'field',
'user',
'system',
];
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('scheduled_transition');
}
public function testScheduledRevision() {
$langCode = 'foobar';
$scheduledTransition = ScheduledTransition::create([
'entity_revision_langcode' => $langCode,
]);
$this
->assertEquals($langCode, $scheduledTransition
->getEntityRevisionLanguage());
}
}