$this->fetcher =
new AnnounceFetcher($httpClient,
$config,
$tempStore,
$logger, 'https://www.drupal.org/announcements.json'
);
} /**
* Test the ValidateUrl() method.
*
* @covers \Drupal\announcements_feed\AnnounceFetcher::validateUrl
*
* @dataProvider urlProvider
*/
public function testValidateUrl($url,
$isValid) { $this->
assertEquals($isValid,
$this->fetcher->
validateUrl($url));
} /**
* Data for the testValidateUrl.
*/
public function urlProvider(): array
{ return [ ['https://www.drupal.org', TRUE
],
['https://drupal.org', TRUE
],
['https://api.drupal.org', TRUE
],
['https://a.drupal.org', TRUE
],
[