protected function ContentGenerationTrait::randomEntity in Workbench Moderation to Content Moderation 8.2
8 calls to ContentGenerationTrait::randomEntity()
- ContentGenerationTrait::generateFieldData in tests/
src/ Kernel/ ContentGenerationTrait.php  - MigrationTestTrait::randomBundle in tests/
src/ Kernel/ MigrationTestTrait.php  - Returns a randomly chosen bundle ID of the entity type under test.
 - TestBase::testMultipleRevisionsWithNewTranslation in tests/
src/ Functional/ TestBase.php  - Migrates an entity with several revisions, one of which adds a translation.
 - TestBase::testMultipleTranslatedMixedRevisions in tests/
src/ Functional/ TestBase.php  - Migrates an entity with several revisions and translations.
 - TestBase::testMultipleTranslatedRevisions in tests/
src/ Functional/ TestBase.php  - Migrates an entity with several revisions, all of which are translated.
 
File
- tests/
src/ Kernel/ ContentGenerationTrait.php, line 124  
Class
Namespace
Drupal\Tests\wbm2cm\KernelCode
protected function randomEntity($entity_type) {
  $items = $this
    ->query($entity_type)
    ->execute();
  shuffle($items);
  return reset($items);
}