protected function ThunderTestTrait::loadTermByUuid in Thunder 6.2.x
Same name and namespace in other branches
- 6.1.x tests/src/Traits/ThunderTestTrait.php \Drupal\Tests\thunder\Traits\ThunderTestTrait::loadTermByUuid()
Load term by UUID.
Parameters
string $uuid: The uuid.
Return value
\Drupal\taxonomy\TermInterface|false|null The term entity.
Throws
\Drupal\Core\Entity\EntityStorageException
14 calls to ThunderTestTrait::loadTermByUuid()
- AccessUnpublishedTest::testAccessUnpublished in tests/
src/ FunctionalJavascript/ Integration/ AccessUnpublishedTest.php - Testing integration of "access_unpublished" module.
- ArticleCreationTest::testCreateArticle in tests/
src/ FunctionalJavascript/ ArticleCreationTest.php - Test Creation of Article.
- ArticleCreationTest::testCreateArticleWithNoModeration in tests/
src/ FunctionalJavascript/ ArticleCreationTest.php - Test Creation of Article without content moderation.
- ArticleCreationTest::testModerationWorkflow in tests/
src/ FunctionalJavascript/ ArticleCreationTest.php - Tests draft creation and that reverting to the default revision works.
- ArticleSchedulerIntegration::testSchedulerAccess in tests/
src/ FunctionalJavascript/ ArticleSchedulerIntegration.php - Test Creation of Article.
File
- tests/
src/ Traits/ ThunderTestTrait.php, line 220
Class
- ThunderTestTrait
- Use this trait to reuse an existing database.
Namespace
Drupal\Tests\thunder\TraitsCode
protected function loadTermByUuid($uuid) {
$term = \Drupal::getContainer()
->get('entity.repository')
->loadEntityByUuid('taxonomy_term', $uuid);
assert($term instanceof TermInterface);
return $term;
}