protected function ContentHubSubscriberTestBase::entityCreate in Acquia Content Hub 8
Creates entity objects based on their types.
Parameters
string $entity_type: The type of the entity that should be created.
\Drupal\Core\Session\AccountInterface $account: The account that will own this entity.
Return value
\Drupal\Core\Entity\EntityInterface|\Drupal\acquia_contenthub_subscriber\Entity\ContentHubFilter The new entity object.
2 calls to ContentHubSubscriberTestBase::entityCreate()
- ContentHubFiltersTest::allHttpRequestDenied in acquia_contenthub_subscriber/
tests/ src/ Functional/ ContentHubFiltersTest.php - Performs all requests to the filters endpoint.
- ContentHubFiltersTest::testFiltersAdminUser in acquia_contenthub_subscriber/
tests/ src/ Functional/ ContentHubFiltersTest.php - Tests Operations on Filters as Admin User.
File
- acquia_contenthub_subscriber/
tests/ src/ Functional/ ContentHubSubscriberTestBase.php, line 335
Class
- ContentHubSubscriberTestBase
- Provides the base class for web tests for Content Hub Subscribers.
Namespace
Drupal\Tests\acquia_contenthub_subscriber\FunctionalCode
protected function entityCreate($entity_type, AccountInterface $account = NULL) {
return $this->container
->get('entity_type.manager')
->getStorage($entity_type)
->create($this
->configEntityValues($entity_type, $account));
}