public function UpdateRecommenderTest::testUpdateAvailable in Automatic Updates 8.2
Tests fetching the recommended release when an update is available.
File
- tests/
src/ Kernel/ UpdateRecommenderTest.php, line 25
Class
Namespace
Drupal\Tests\automatic_updates\KernelCode
public function testUpdateAvailable() : void {
$recommender = new UpdateRecommender();
$recommended_release = $recommender
->getRecommendedRelease(TRUE);
$this
->assertNotEmpty($recommended_release);
$this
->assertSame('9.8.1', $recommended_release
->getVersion());
// Getting the recommended release again should not trigger another request.
$this
->assertNotEmpty($recommender
->getRecommendedRelease());
}