You are here

public function UpdateHookRegistryTest::testGetVersions in Drupal 9

@covers ::getAvailableUpdates

File

core/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php, line 91

Class

UpdateHookRegistryTest
@coversDefaultClass \Drupal\Core\Update\UpdateHookRegistry @group Update

Namespace

Drupal\Tests\Core\Update

Code

public function testGetVersions() {
  $module_name = 'drupal\\tests\\core\\update\\under_test';
  $update_registry = new UpdateHookRegistry([], $this->keyValueStore);

  // Only under_test_update_X - passes through the filter.
  $expected = [
    1,
    20,
    3000,
  ];
  $actual = $update_registry
    ->getAvailableUpdates($module_name);
  $this
    ->assertSame($expected, $actual);
}