function setUp() { parent::setUp(); // Run the install hook. // @TODO: figure out why this is necessary. module_load_install('domain_source'); domain_source_install(); }
/** * {@inheritdoc} */ public function setUp() { parent::setUp(); // Set the condition manager. $this->manager = $this->container->get('plugin.manager.condition'); // Create test domains. $this->domainCreateTestDomains(5); // Get two sample domains. $this->domains = \Drupal::service('domain.loader')->loadMultiple(); $this->test_domain = array_shift($this->domains); $this->not_domain = array_shift($this->domains); }
function setUp() { parent::setUp(); // Run the install hook. // @TODO: figure out why this is necessary. module_load_install('domain_access'); domain_access_install(); // Set the access handler. $this->accessHandler = \Drupal::entityManager()->getAccessControlHandler('node'); // Clear permissions for authenticated users. $this->config('user.role.' . DRUPAL_AUTHENTICATED_RID)->set('permissions', array())->save(); }
public function setUp() { parent::setUp(); // Clear permissions for authenticated users. $this->config('user.role.' . RoleInterface::AUTHENTICATED_ID)->set('permissions', array())->save(); // Create Basic page node type. if ($this->profile != 'standard') { $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page', 'display_submitted' => FALSE)); } $this->accessHandler = \Drupal::entityManager()->getAccessControlHandler('node'); $this->manager = \Drupal::service('domain_access.manager'); // Create 5 domains. $this->domainCreateTestDomains(5); // Run the install hook. // @TODO: figure out why this is necessary. module_load_install('domain_access'); domain_access_install(); }
/** * Test setup. */ function setUp() { parent::setUp(); // Create and login user. $admin_user = $this->drupalCreateUser(array('administer languages', 'access administration pages')); $this->drupalLogin($admin_user); // Add language. $edit = array('predefined_langcode' => 'es'); $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add language')); // Enable URL language detection and selection. $edit = array('language_interface[enabled][language-url]' => '1'); $this->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings')); $this->drupalLogout(); // In order to reflect the changes for a multilingual site in the container // we have to rebuild it. $this->rebuildContainer(); $es = \Drupal::entityManager()->getStorage('configurable_language')->load('es'); $this->assertTrue(!empty($es), 'Created test language.'); }
/** * @inheritdoc */ public function setUp() { parent::setUp(); }