private function RedirectCollectorTest::getRedirectUuid in Acquia Content Hub 8.2
Helper function to create redirect.
Parameters
array $input_array: Input array for redirect entity.
Return value
string Uuid of redirect created.
Throws
\Drupal\Core\Entity\EntityStorageException
1 call to RedirectCollectorTest::getRedirectUuid()
- RedirectCollectorTest::testRedirectDependencies in tests/
src/ Kernel/ DependencyCollector/ RedirectCollectorTest.php - Tests redirect dependencies for given entity.
File
- tests/
src/ Kernel/ DependencyCollector/ RedirectCollectorTest.php, line 161
Class
- RedirectCollectorTest
- Test entity redirect dependency collector.
Namespace
Drupal\Tests\acquia_contenthub\Kernel\DependencyCollectorCode
private function getRedirectUuid(array $input_array) : string {
$storage = \Drupal::entityTypeManager()
->getStorage('redirect');
$redirect = $storage
->create($input_array);
$redirect
->save();
return $redirect
->uuid();
}