public function createTestEntity(EntityStorageInterface $storage, array $values) { switch ($storage->getEntityTypeId()) { case 'block_content': $values['info'] = $this->randomMachineName(); break; case 'user': $values['name'] = $this->randomMachineName(); break; } return $storage->create($values); }