public function UrlResolverTest::testResourceUrlAlterHook in Drupal 8
Same name and namespace in other branches
- 9 core/modules/media/tests/src/Functional/UrlResolverTest.php \Drupal\Tests\media\Functional\UrlResolverTest::testResourceUrlAlterHook()
- 10 core/modules/media/tests/src/Functional/UrlResolverTest.php \Drupal\Tests\media\Functional\UrlResolverTest::testResourceUrlAlterHook()
Tests that hook_oembed_resource_url_alter() is invoked.
@depends testEndpointMatching
File
- core/
modules/ media/ tests/ src/ Functional/ UrlResolverTest.php, line 82
Class
- UrlResolverTest
- Tests the oEmbed URL resolver service.
Namespace
Drupal\Tests\media\FunctionalCode
public function testResourceUrlAlterHook() {
$this->container
->get('module_installer')
->install([
'media_test_oembed',
]);
$resource_url = $this->container
->get('media.oembed.url_resolver')
->getResourceUrl('https://vimeo.com/14782834');
$this
->assertStringContainsString('altered=1', parse_url($resource_url, PHP_URL_QUERY));
}