You are here

public function TestBase::testSingleUntranslatedRevision in Workbench Moderation to Content Moderation 8.2

Migrates an entity with only one revision and no translations.

File

tests/src/Functional/TestBase.php, line 123

Class

TestBase

Namespace

Drupal\Tests\wbm2cm\Functional

Code

public function testSingleUntranslatedRevision() {
  $moderation_state = $this
    ->randomEntity('moderation_state');
  $entity = $this
    ->createEntity()
    ->set('moderation_state', $moderation_state);
  $this->storage
    ->save($entity);
  $this
    ->doMigration();
  $this
    ->assertSame($moderation_state, $this->storage
    ->load($entity
    ->id())->moderation_state->value);
}