You are here

public function ModuleInstallTest::testKnownVersion in Lightning Core 8.4

Same name and namespace in other branches
  1. 8.5 tests/src/Kernel/ModuleInstallTest.php \Drupal\Tests\lightning_core\Kernel\ModuleInstallTest::testKnownVersion()
  2. 8 tests/src/Kernel/ModuleInstallTest.php \Drupal\Tests\lightning_core\Kernel\ModuleInstallTest::testKnownVersion()
  3. 8.2 tests/src/Kernel/ModuleInstallTest.php \Drupal\Tests\lightning_core\Kernel\ModuleInstallTest::testKnownVersion()
  4. 8.3 tests/src/Kernel/ModuleInstallTest.php \Drupal\Tests\lightning_core\Kernel\ModuleInstallTest::testKnownVersion()

File

tests/src/Kernel/ModuleInstallTest.php, line 19

Class

ModuleInstallTest
@group lightning_core @group orca_public

Namespace

Drupal\Tests\lightning_core\Kernel

Code

public function testKnownVersion() {
  drupal_static_reset('system_get_info');
  $this->container
    ->get('cache.default')
    ->set('system.module.info', [
    'fubar' => [
      'version' => '8.x-2.2',
    ],
  ]);
  lightning_core_modules_installed([
    'fubar',
  ]);
  $version = $this->container
    ->get('config.factory')
    ->get(UpdateManager::CONFIG_NAME)
    ->get('fubar');
  $this
    ->assertSame('2.2.0', $version);
}