public function ModuleInstallTest::testUnknownDiscoverableVersion in Lightning Core 8
Same name and namespace in other branches
- 8.5 tests/src/Kernel/ModuleInstallTest.php \Drupal\Tests\lightning_core\Kernel\ModuleInstallTest::testUnknownDiscoverableVersion()
- 8.2 tests/src/Kernel/ModuleInstallTest.php \Drupal\Tests\lightning_core\Kernel\ModuleInstallTest::testUnknownDiscoverableVersion()
- 8.3 tests/src/Kernel/ModuleInstallTest.php \Drupal\Tests\lightning_core\Kernel\ModuleInstallTest::testUnknownDiscoverableVersion()
- 8.4 tests/src/Kernel/ModuleInstallTest.php \Drupal\Tests\lightning_core\Kernel\ModuleInstallTest::testUnknownDiscoverableVersion()
@depends testKnownVersion
File
- tests/
src/ Kernel/ ModuleInstallTest.php, line 41
Class
- ModuleInstallTest
- @group lightning @group lightning_core
Namespace
Drupal\Tests\lightning_core\KernelCode
public function testUnknownDiscoverableVersion() {
$discovery = $this
->prophesize('\\Drupal\\Component\\Plugin\\Discovery\\DiscoveryInterface');
$discovery
->getDefinitions()
->willReturn([
'fubar:2.2.0' => [
'id' => '2.2.0',
'provider' => 'fubar',
],
'fubar:2.3.0' => [
'id' => '2.3.0',
'provider' => 'fubar',
],
]);
$this->container
->set('lightning.update_manager', new UpdateManager($this->container
->get('container.namespaces'), $this->container
->get('class_resolver'), $this->container
->get('config.factory'), $discovery
->reveal()));
lightning_core_modules_installed([
'fubar',
]);
$version = $this->container
->get('config.factory')
->get(UpdateManager::CONFIG_NAME)
->get('fubar');
$this
->assertSame('2.3.0', $version);
}