function UrlResolverTest::testEndpointMatching
Same name in other branches
- 8.9.x core/modules/media/tests/src/Functional/UrlResolverTest.php \Drupal\Tests\media\Functional\UrlResolverTest::testEndpointMatching()
- 10 core/modules/media/tests/src/Functional/UrlResolverTest.php \Drupal\Tests\media\Functional\UrlResolverTest::testEndpointMatching()
- 11.x core/modules/media/tests/src/Functional/UrlResolverTest.php \Drupal\Tests\media\Functional\UrlResolverTest::testEndpointMatching()
Tests resource URL resolution with a matched provider endpoint.
@covers ::getProviderByUrl @covers ::getResourceUrl
@dataProvider providerEndpointMatching
Parameters
string $url: The asset URL to resolve.
string $resource_url: The expected oEmbed resource URL of the asset.
File
-
core/
modules/ media/ tests/ src/ Functional/ UrlResolverTest.php, line 73
Class
- UrlResolverTest
- Tests the oEmbed URL resolver service.
Namespace
Drupal\Tests\media\FunctionalCode
public function testEndpointMatching($url, $resource_url) {
$this->assertSame($resource_url, $this->container
->get('media.oembed.url_resolver')
->getResourceUrl($url));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.