public function UpdateFetcherTest::testUpdateBuildFetchUrl in Drupal 8
Tests that buildFetchUrl() builds the URL correctly.
@dataProvider providerTestUpdateBuildFetchUrl
Parameters
array $project: A keyed array of project information matching results from \Drupal\update\UpdateManager::getProjects().
string $site_key: A string to mimic an anonymous site key hash.
string $expected: The expected url returned from UpdateFetcher::buildFetchUrl()
See also
\Drupal\update\UpdateFetcher::buildFetchUrl()
File
- core/
modules/ update/ tests/ src/ Unit/ UpdateFetcherTest.php, line 46
Class
- UpdateFetcherTest
- Tests update functionality unrelated to the database.
Namespace
Drupal\Tests\update\UnitCode
public function testUpdateBuildFetchUrl(array $project, $site_key, $expected) {
$url = $this->updateFetcher
->buildFetchUrl($project, $site_key);
$this
->assertEquals($url, $expected);
}