function UpdateFetcherTest::testUpdateBuildFetchUrl
Same name in other branches
- 8.9.x 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 113
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);
$this->assertSame([], $this->logMessages);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.