You are here

public function EntityDefinitionUpdateTest::testNoUpdates in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php \Drupal\KernelTests\Core\Entity\EntityDefinitionUpdateTest::testNoUpdates()
  2. 10 core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php \Drupal\KernelTests\Core\Entity\EntityDefinitionUpdateTest::testNoUpdates()

Tests when no definition update is needed.

File

core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php, line 100

Class

EntityDefinitionUpdateTest
Tests EntityDefinitionUpdateManager functionality.

Namespace

Drupal\KernelTests\Core\Entity

Code

public function testNoUpdates() {

  // Ensure that the definition update manager reports no updates.
  $this
    ->assertFalse($this->entityDefinitionUpdateManager
    ->needsUpdates(), 'EntityDefinitionUpdateManager reports that no updates are needed.');
  $this
    ->assertSame([], $this->entityDefinitionUpdateManager
    ->getChangeSummary(), 'EntityDefinitionUpdateManager reports an empty change summary.');
  $this
    ->assertSame([], $this->entityDefinitionUpdateManager
    ->getChangeList(), 'EntityDefinitionUpdateManager reports an empty change list.');
}