public function setUp()
 {
     parent::setUp();
     $this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'bypass node access'));
     $this->drupalLogin($this->admin_user);
     $this->vocabulary = $this->createVocabulary();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->admin_user = $this->drupalCreateUser(array('administer taxonomy'));
     $this->drupalLogin($this->admin_user);
     $this->vocabulary = $this->createVocabulary();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->setupLanguages();
     $this->vocabulary = $this->createVocabulary();
     $this->enableTranslation();
     $this->setUpTerm();
     $this->setUpTermReferenceField(TRUE);
     $this->setUpNode();
 }
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     // Create a term with markup in the label.
     $first = $this->createTerm(['name' => '<em>First</em>']);
     // Create a node w/o any terms.
     $settings = ['type' => 'article'];
     // Create a node with linked to the term.
     $settings['field_views_testing_tags'][0]['target_id'] = $first->id();
     $this->nodes[] = $this->drupalCreateNode($settings);
     $this->terms[0] = $first;
 }
 protected function setUp()
 {
     parent::setUp();
     // Make sure we are using distinct default and administrative themes for
     // the duration of these tests.
     \Drupal::service('theme_handler')->install(array('bartik', 'seven'));
     \Drupal::config('system.theme')->set('default', 'bartik')->set('admin', 'seven')->save();
     // Create and log in as a user who has permission to add and edit taxonomy
     // terms and view the administrative theme.
     $admin_user = $this->drupalCreateUser(array('administer taxonomy', 'view the administration theme'));
     $this->drupalLogin($admin_user);
 }
 protected function setUp()
 {
     parent::setUp();
     // Remove access content permission from registered users.
     user_role_revoke_permissions(DRUPAL_AUTHENTICATED_RID, array('access content'));
     $this->vocabulary = $this->createVocabulary();
     // Add a field to the vocabulary.
     $entity_type = 'taxonomy_term';
     $name = 'field_test';
     entity_create('field_storage_config', array('field_name' => $name, 'entity_type' => $entity_type, 'type' => 'image', 'settings' => array('uri_scheme' => 'private')))->save();
     entity_create('field_config', array('field_name' => $name, 'entity_type' => $entity_type, 'bundle' => $this->vocabulary->id(), 'settings' => array()))->save();
     entity_get_display($entity_type, $this->vocabulary->id(), 'default')->setComponent($name, array('type' => 'image', 'settings' => array()))->save();
     entity_get_form_display($entity_type, $this->vocabulary->id(), 'default')->setComponent($name, array('type' => 'image_image', 'settings' => array()))->save();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->drupalPlaceBlock('page_title_block');
 }
 protected function setUp()
 {
     parent::setUp();
     $this->drupalLogin($this->drupalCreateUser(['administer taxonomy', 'bypass node access']));
     $this->vocabulary = $this->createVocabulary();
 }
Esempio n. 9
0
 function setUp()
 {
     parent::setUp();
     $this->taxonomy_admin = $this->drupalCreateUser(array('administer taxonomy'));
     $this->drupalLogin($this->taxonomy_admin);
 }