public function ProviderRepositoryTest::testProvidersAlterHook in oEmbed Providers 1.1.x
Same name and namespace in other branches
- 2.x tests/src/Functional/ProviderRepositoryTest.php \Drupal\Tests\oembed_providers\Functional\ProviderRepositoryTest::testProvidersAlterHook()
Tests that hook_oembed_providers_alter() is invoked.
File
- tests/
src/ Functional/ ProviderRepositoryTest.php, line 125
Class
- ProviderRepositoryTest
- Tests the oEmbed provider repository.
Namespace
Drupal\Tests\oembed_providers\FunctionalCode
public function testProvidersAlterHook() {
$this->container
->get('module_installer')
->install([
'oembed_providers_test',
]);
$providers = $this->container
->get('media.oembed.provider_repository')
->getAll();
$this
->assertArrayHasKey('My Custom Provider', $providers);
}