function ProviderRepositoryTest::testNonExistingProviderDatabase
Same name in this branch
- 10 core/modules/media/tests/src/Kernel/ProviderRepositoryTest.php \Drupal\Tests\media\Kernel\ProviderRepositoryTest::testNonExistingProviderDatabase()
Same name in other branches
- 9 core/modules/media/tests/src/Functional/ProviderRepositoryTest.php \Drupal\Tests\media\Functional\ProviderRepositoryTest::testNonExistingProviderDatabase()
- 8.9.x core/modules/media/tests/src/Functional/ProviderRepositoryTest.php \Drupal\Tests\media\Functional\ProviderRepositoryTest::testNonExistingProviderDatabase()
- 11.x core/modules/media/tests/src/Functional/ProviderRepositoryTest.php \Drupal\Tests\media\Functional\ProviderRepositoryTest::testNonExistingProviderDatabase()
- 11.x core/modules/media/tests/src/Kernel/ProviderRepositoryTest.php \Drupal\Tests\media\Kernel\ProviderRepositoryTest::testNonExistingProviderDatabase()
Tests that provider discovery fails with a non-existent provider database.
@dataProvider providerNonExistingProviderDatabase
Parameters
string $providers_url: The URL of the provider database.
string $exception_message: The expected exception message.
File
-
core/
modules/ media/ tests/ src/ Functional/ ProviderRepositoryTest.php, line 72
Class
- ProviderRepositoryTest
- Tests the oEmbed provider repository.
Namespace
Drupal\Tests\media\FunctionalCode
public function testNonExistingProviderDatabase($providers_url, $exception_message) {
$this->config('media.settings')
->set('oembed_providers_url', $providers_url)
->save();
$this->expectException(ProviderException::class);
$this->expectExceptionMessage($exception_message);
$this->container
->get('media.oembed.provider_repository')
->getAll();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.