public function UpdateChecklistTest::testGetUpdateVersions in Update helper 2.x
Same name and namespace in other branches
- 8 modules/update_helper_checklist/tests/src/Kernel/UpdateChecklistTest.php \Drupal\Tests\update_helper_checklist\Kernel\UpdateChecklistTest::testGetUpdateVersions()
@covers \Drupal\update_helper_checklist\UpdateChecklist::getUpdateVersions
File
- modules/
update_helper_checklist/ tests/ src/ Kernel/ UpdateChecklistTest.php, line 55
Class
Namespace
Drupal\Tests\update_helper_checklist\KernelCode
public function testGetUpdateVersions() {
$update_checklist = $this
->getUpdateChecklist();
// Get update versions when module is not installed yet.
$update_versions = $update_checklist
->getUpdateVersions('update_helper_checklist_test');
$this
->assertEquals([], $update_versions);
// After module is installed.
$this->container
->get('module_installer')
->install([
'update_helper_checklist_test',
]);
$update_versions = $update_checklist
->getUpdateVersions('update_helper_checklist_test');
$this
->assertEquals([
'v8.x-1.0',
'v8.x-1.1',
], $update_versions);
}