/**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->drupalLogin($this->createAdminUser());
     $this->setupEntityDisplays();
     $this->manageDisplay = 'admin/structure/types/manage/test_content_type_name/display/teaser';
 }
Пример #2
0
 protected function setUp()
 {
     parent::setUp();
     // Create users.
     $this->adminUser = $this->drupalCreateUser(array('access administration pages', 'view the administration theme', 'administer permissions'));
     $this->anyUser = $this->drupalCreateUser(array());
 }
Пример #3
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->cookies = new CookieJar();
     $encoders = [new JsonEncoder(), new XmlEncoder()];
     $this->serializer = new Serializer([], $encoders);
 }
Пример #4
0
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->createContentType(['type' => 'page']);
     $this->createNode(['title' => 'Alpha']);
     $this->createNode(['title' => 'Beta']);
     $this->createNode(['title' => 'Gamma']);
 }
Пример #5
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     \Drupal::service('theme_handler')->install(array('bartik'));
     // Create user.
     $this->adminUser = $this->drupalCreateUser(array('administer themes'));
     $this->drupalLogin($this->adminUser);
 }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     EnhancedEntityBundle::create(['id' => 'default', 'label' => 'Default'])->save();
     $this->placeBlock('local_tasks_block');
     $this->placeBlock('system_breadcrumb_block');
     $this->account = $this->drupalCreateUser(['administer entity_test_enhanced', 'view all entity_test_enhanced revisions']);
     $this->drupalLogin($this->account);
 }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $node_type = NodeType::create(['type' => 'article', 'name' => t('Article')]);
     $node_type->save();
     $this->nodeAuthor = $this->drupalCreateUser(['create article content', 'skip comment approval', 'post comments', 'edit own comments', 'access comments', 'administer nodes']);
     $this->commentAdmin = $this->drupalCreateUser(['administer comments', 'create article content', 'edit own comments', 'skip comment approval', 'post comments', 'access comments', 'administer nodes']);
     $this->addDefaultCommentField('node', 'article');
 }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->drupalLogin($this->createAdminUser());
     $this->drupalGet('admin/config/content/formats/manage/plain_text');
     // Setup the filter to have an editor.
     $this->getSession()->getPage()->find('css', '[name="editor[editor]"]')->setValue('ckeditor');
     $this->getSession()->getPage()->find('css', 'input[name="editor_configure"]')->click();
     $this->submitForm([], t('Save configuration'));
 }
Пример #9
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     // Create user.
     $this->bigUser = $this->drupalCreateUser(array('administer themes'));
     // This tests the color module in Bartik.
     $this->themes = array('bartik' => array('palette_input' => 'palette[bg]', 'scheme' => 'slate', 'scheme_color' => '#3b3b3b'), 'color_test_theme' => array('palette_input' => 'palette[bg]', 'scheme' => 'custom', 'scheme_color' => '#3b3b3b'));
     \Drupal::service('theme_handler')->install(array_keys($this->themes));
     // Array filled with valid and not valid color values.
     $this->colorTests = array('#000' => TRUE, '#123456' => TRUE, '#abcdef' => TRUE, '#0' => FALSE, '#00' => FALSE, '#0000' => FALSE, '#00000' => FALSE, '123456' => FALSE, '#00000g' => FALSE);
 }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     /** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */
     $module_handler = $this->container->get('module_handler');
     /** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */
     $config_factory = $this->container->get('config.factory');
     // Set up the remote library definition URL to point to the local website.
     $base_url = getenv('SIMPLETEST_BASE_URL');
     $module_path = $module_handler->getModule('libraries')->getPath();
     $url = "{$base_url}/{$module_path}/tests/library_definitions";
     $config_factory->getEditable('libraries.settings')->set('definition.remote.url', $url)->save();
     // LibrariesConfigSubscriber::onConfigSave() invalidates the container so
     // that it is rebuilt on the next request. We need the container rebuilt
     // immediately, however.
     $this->rebuildContainer();
     $this->discovery = $this->container->get('libraries.definition.discovery');
     $this->localDiscovery = $this->container->get('libraries.definition.discovery.local');
     $this->remoteDiscovery = $this->container->get('libraries.definition.discovery.remote');
 }
  /**
   * {@inheritdoc}
   */
  public function setUp() {
    parent::setUp();

    $this->drupalPlaceBlock('local_tasks_block');

    $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']);
    $this->drupalCreateNode();

    ConfigurableLanguage::create(['id' => 'fi'])->save();

    // In order to reflect the changes for a multilingual site in the container
    // we have to rebuild it.
    $this->rebuildContainer();

    $alias_storage = $this->container->get('path.alias_storage');
    $alias_storage->save('/node/1', '/kittens');
    $alias_white_list = $this->container->get('path.alias_whitelist');
    $alias_white_list->set('node', TRUE);

    $admin_user = $this->drupalCreateUser([
      'bypass node access',
    ]);
    $this->drupalLogin($admin_user);
  }
Пример #12
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->adminUser = $this->drupalCreateUser(['administer address formats', 'access administration pages', 'administer site configuration']);
     $this->drupalLogin($this->adminUser);
 }
Пример #13
0
 protected function setUp()
 {
     parent::setUp();
     $this->adminUser = $this->drupalCreateUser(array('access administration pages'));
 }
Пример #14
0
 protected function setUp()
 {
     parent::setUp();
     $this->helpBlock = $this->placeBlock('help_block');
 }
Пример #15
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     // Create user.
     $this->bigUser = $this->drupalCreateUser(['administer themes']);
 }
Пример #16
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->drupalLogin($this->createAdminUser());
 }
  /**
   * {@inheritdoc}
   */
  public function setUp() {
    parent::setUp();

    Vocabulary::create(['vid' => 'test'])->save();
  }
Пример #18
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->drupalLogin($this->drupalCreateUser(['administer account settings']));
 }