protected function MediaEntitySlideshowTest::loadMedia in Media entity slideshow 8
Load the specified media from the storage.
Parameters
int $id: The media identifier.
Return value
\Drupal\media_entity\MediaInterface The loaded media entity.
1 call to MediaEntitySlideshowTest::loadMedia()
- MediaEntitySlideshowTest::testMediaEntitySlideshow in src/
Tests/ MediaEntitySlideshowTest.php - Tests media entity slideshow.
File
- src/
Tests/ MediaEntitySlideshowTest.php, line 160
Class
- MediaEntitySlideshowTest
- Tests for media entity slideshow.
Namespace
Drupal\media_entity_slideshow\TestsCode
protected function loadMedia($id) {
/** @var \Drupal\media_entity\MediaStorage $storage */
$storage = $this->container
->get('entity_type.manager')
->getStorage('media');
return $storage
->loadUnchanged($id);
}