You are here

protected function ParagraphsTest::assertRevNumber in Multiversion 8

Assert that entity has given _rev number.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: Given entity.

int $expected_rev_number: Expected _rev number.

3 calls to ParagraphsTest::assertRevNumber()
ParagraphsTest::testDefaultParagraphsBehaviour in tests/src/Kernel/ParagraphsTest.php
Tests that paragraphs revisions created right when saving parent entity.
ParagraphsTest::testParagraphStubCreatedAfterParent in tests/src/Kernel/ParagraphsTest.php
Tests stub handling for paragraph when it is created after parent entity.
ParagraphsTest::testParagraphStubCreatedBeforeParent in tests/src/Kernel/ParagraphsTest.php
Tests stub handling for paragraph when it is created before parent entity.

File

tests/src/Kernel/ParagraphsTest.php, line 191

Class

ParagraphsTest
Test for paragraphs integration.

Namespace

Drupal\Tests\multiversion\Kernel

Code

protected function assertRevNumber(EntityInterface $entity, $expected_rev_number) {
  list($rev_number) = explode('-', $entity->_rev->value);
  $this
    ->assertEquals($expected_rev_number, $rev_number);
}