protected function ThunderTestTrait::loadMediaByUuid in Thunder 6.1.x
Same name and namespace in other branches
- 6.2.x tests/src/Traits/ThunderTestTrait.php \Drupal\Tests\thunder\Traits\ThunderTestTrait::loadMediaByUuid()
Load media by UUID.
Parameters
string $uuid: The uuid.
Return value
\Drupal\media\MediaInterface|false|null The media entity.
Throws
\Drupal\Core\Entity\EntityStorageException
9 calls to ThunderTestTrait::loadMediaByUuid()
- ArticleCreationTest::testCreateArticle in tests/
src/ FunctionalJavascript/ ArticleCreationTest.php - Test Creation of Article.
- ChannelsTagsTest::testChannelsCreation in tests/
src/ FunctionalJavascript/ ChannelsTagsTest.php - Test channel creation, tagging of articles and channel page with articles.
- LiveblogTest::testWithPusher in tests/
src/ FunctionalJavascript/ Integration/ LiveblogTest.php - Testing of module integration.
- MediaGalleryModifyTest::testAddRemove in tests/
src/ FunctionalJavascript/ MediaGalleryModifyTest.php - Test add/remove Images in Gallery.
- MediaGalleryModifyTest::testOrderChange in tests/
src/ FunctionalJavascript/ MediaGalleryModifyTest.php - Test order change for Gallery.
File
- tests/
src/ Traits/ ThunderTestTrait.php, line 183
Class
- ThunderTestTrait
- Use this trait to reuse an existing database.
Namespace
Drupal\Tests\thunder\TraitsCode
protected function loadMediaByUuid($uuid) {
return \Drupal::getContainer()
->get('entity.repository')
->loadEntityByUuid('media', $uuid);
}