function UpdateFetcherTest::testUpdateBuildFetchUrl
Same name in other branches
- 9 core/modules/update/tests/src/Unit/UpdateFetcherTest.php \Drupal\Tests\update\Unit\UpdateFetcherTest::testUpdateBuildFetchUrl()
- 10 core/modules/update/tests/src/Unit/UpdateFetcherTest.php \Drupal\Tests\update\Unit\UpdateFetcherTest::testUpdateBuildFetchUrl()
- 11.x core/modules/update/tests/src/Unit/UpdateFetcherTest.php \Drupal\Tests\update\Unit\UpdateFetcherTest::testUpdateBuildFetchUrl()
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.