You are here

protected function ContentEntitySourceContentModerationTest::assertNodeTranslationsRevisionsCount in Translation Management Tool 8

Asserts number of revisions for the given node ID and language code.

2 calls to ContentEntitySourceContentModerationTest::assertNodeTranslationsRevisionsCount()
ContentEntitySourceContentModerationTest::testModeratedContentTranslations in sources/content/tests/src/Functional/ContentEntitySourceContentModerationTest.php
Test the content moderation workflow with translatable nodes.
ContentEntitySourceContentModerationTest::testNonModeratedContentTranslations in sources/content/tests/src/Functional/ContentEntitySourceContentModerationTest.php
Test the non-moderated workflow with translatable nodes.

File

sources/content/tests/src/Functional/ContentEntitySourceContentModerationTest.php, line 502

Class

ContentEntitySourceContentModerationTest
Tests content entity source integration with content moderation.

Namespace

Drupal\Tests\tmgmt_content\Functional

Code

protected function assertNodeTranslationsRevisionsCount($id, $langcode, $expected) {
  $translation_revisions_count = \Drupal::entityQuery('node')
    ->condition('nid', $id)
    ->condition('langcode', $langcode)
    ->allRevisions()
    ->count()
    ->execute();
  $this
    ->assertEqual($expected, $translation_revisions_count);
}