Skip to content
Snippets Groups Projects
Commit b7101e97 authored by Adam G-H's avatar Adam G-H
Browse files

Issue #3375640 by phenaproxima: StatusChecker::getLastRunTime() is only tested indirectly

parent 06e82f14
No related branches found
No related tags found
2 merge requests!989Issue #3356804 by phenaproxima: Flag a warning during status check if the...,!954Issue #3375640: StatusChecker::getLastRunTime() is only tested indirectly
......@@ -283,4 +283,21 @@ class StatusCheckerTest extends AutomaticUpdatesKernelTestBase {
$this->assertNull($this->getResultsFromManager(FALSE));
}
/**
* @covers ::getLastRunTime
*/
public function testLastRunTime(): void {
$this->enableModules(['automatic_updates']);
/** @var \Drupal\automatic_updates\Validation\StatusChecker $status_checker */
$status_checker = $this->container->get(StatusChecker::class);
$this->assertNull($status_checker->getLastRunTime());
$status_checker->run();
$last_run_time = $status_checker->getLastRunTime();
$this->assertIsInt($last_run_time);
$status_checker->clearStoredResults();
// The last run time should be unaffected by clearing stored results.
$this->assertSame($last_run_time, $status_checker->getLastRunTime());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment