Skip to content

Instantly share code, notes, and snippets.

@victor-shelepen
Created June 24, 2015 07:02
Show Gist options
  • Save victor-shelepen/e27ea2411893d179bc7b to your computer and use it in GitHub Desktop.
Save victor-shelepen/e27ea2411893d179bc7b to your computer and use it in GitHub Desktop.
There are D8 snippets.
// It creates an entety instance, etity_type=taxonomy_term .
$term = entity_create('taxonomy_term', array(
'name' => 'test',
'vid' => 'client',
))->save();
// urlInfo return an entity route.
$this->drupalGet($entity->urlInfo());
$this->drupalGet($entity->urlInfo('drupal:content-translation-overview'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment