You are here

public function LingotekContentMetadataJobIdUpdate8206Test::testUpgrade in Lingotek Translation 8.2

Tests that the upgrade sets the job id field as empty.

File

tests/src/Functional/Update/LingotekContentMetadataJobIdUpdate8206Test.php, line 27

Class

LingotekContentMetadataJobIdUpdate8206Test
Tests the upgrade path for adding the job id field to content metadata.

Namespace

Drupal\Tests\lingotek\Functional\Update

Code

public function testUpgrade() {
  $this
    ->runUpdates();

  /** @var \Drupal\lingotek\Entity\LingotekContentMetadata[] $metadatas */
  $metadatas = LingotekContentMetadata::loadMultiple();
  foreach ($metadatas as $id => $metadata) {
    $this
      ->assertSame('', $metadata
      ->getJobId(), "Job id is empty.");
  }
}