function DevReleaseTest::testSecurityUpdates
Same name in other branches
- 11.x core/modules/update/tests/src/Kernel/DevReleaseTest.php \Drupal\Tests\update\Kernel\DevReleaseTest::testSecurityUpdates()
Tests security updates when the installed version is a dev version.
The xml fixture used here has two security releases 8.1.2 and 8.1.1.
Here the timestamp for the installed dev version is set to 1280424641. 8.1.2 will be shown as security update as the date of this security release i.e. 1280424741 is greater than the timestamp of the installed version + 100 seconds. 8.1.1 will not be shown as security update because it's date i.e. 1280424740 is less than timestamp of the installed version + 100 seconds.
File
-
core/
modules/ update/ tests/ src/ Kernel/ DevReleaseTest.php, line 88
Class
- DevReleaseTest
- Tests the project data when the installed version is a dev version.
Namespace
Drupal\Tests\update\KernelCode
public function testSecurityUpdates() : void {
$system_info = [
'#all' => [
'version' => '8.1.0-dev',
'datestamp' => '1280424641',
],
];
$project_data = $this->getProjectData($system_info);
$this->assertCount(1, $project_data['drupal']['security updates']);
$this->assertSame('8.1.2', $project_data['drupal']['security updates'][0]['version']);
$this->assertSame(UpdateManagerInterface::NOT_CURRENT, $project_data['drupal']['status']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.