private function InstallUninstallTest::getAllowedMediaTypes in Lightning Media 8.3
Returns the media types which can be referenced in slideshows.
The returned array is sorted so that it can be compared with == (i.e., ::assertEquals()), which treats the compared arrays as associative, even if they're numerically indexed.
Return value
string[] The reference-able media type IDs.
1 call to InstallUninstallTest::getAllowedMediaTypes()
- InstallUninstallTest::testInstall in modules/
lightning_media_slideshow/ tests/ src/ Functional/ InstallUninstallTest.php - Tests module install.
File
- modules/
lightning_media_slideshow/ tests/ src/ Functional/ InstallUninstallTest.php, line 80
Class
- InstallUninstallTest
- Tests install/uninstall operations of Media Slideshow.
Namespace
Drupal\Tests\lightning_media_slideshow\FunctionalCode
private function getAllowedMediaTypes() {
$handler_settings = FieldConfig::loadByName('block_content', 'media_slideshow', 'field_slideshow_items')
->getSetting('handler_settings');
$target_bundles = array_values($handler_settings['target_bundles']);
$this
->assertTrue(sort($target_bundles));
return $target_bundles;
}