예제 #1
0
  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();

    ViewTestData::createTestViews(get_class($this), array('views_test_config'));

    // Create a Content type and some test nodes with titles that start with
    // different letters.
    $this->createContentType(['type' => 'page']);

    $titles = [
      'Page One',
      'Page Two',
      'Another page',
    ];
    foreach ($titles as $title) {
      $this->createNode([
        'title' => $title,
        'language' => 'en',
      ]);
      $this->createNode([
        'title' => $title,
        'language' => 'nl',
      ]);
    }

    // Create a user privileged enough to use exposed filters and view content.
    $user = $this->drupalCreateUser([
      'administer site configuration',
      'access content',
      'access content overview',
    ]);
    $this->drupalLogin($user);
  }
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     // Use the big_pipe_test_theme theme.
     $this->container->get('theme_installer')->install(['big_pipe_test_theme']);
     $this->container->get('config.factory')->getEditable('system.theme')->set('default', 'big_pipe_test_theme')->save();
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->adminUser = $this->drupalCreateUser(array_keys($this->container->get('user.permissions')->getPermissions()));
     $this->drupalLogin($this->adminUser);
     $this->createContentType(['type' => 'page']);
     \Drupal::configFactory()->getEditable('image.settings')->set('suppress_itok_output', TRUE)->save();
 }
예제 #4
0
  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();

    $account = $this->drupalCreateUser(array(
      'access content',
    ));
    $this->drupalLogin($account);
  }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->createContentType(['type' => 'page']);
     foreach (range(0, 10) as $i) {
         $this->createNode(['status' => TRUE, 'type' => 'page']);
     }
 }
예제 #6
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->placeBlock('local_tasks_block');
     $this->placeBlock('local_actions_block');
     $this->placeBlock('page_title_block');
     $this->adminUser = $this->drupalCreateUser(['administer zones', 'access administration pages', 'administer site configuration']);
     $this->drupalLogin($this->adminUser);
 }
예제 #7
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $account = $this->drupalCreateUser();
     $this->drupalLogin($account);
     $menu_link_content = MenuLinkContent::create(['title' => 'Link to front page', 'menu_name' => 'tools', 'link' => ['uri' => 'route:<front>']]);
     $menu_link_content->save();
     $this->drupalPlaceBlock('system_menu_block:tools');
 }
  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();

    ViewTestData::createTestViews(get_class($this), ['views_test_config']);

    // Disable automatic live preview to make the sequence of calls clearer.
    \Drupal::configFactory()->getEditable('views.settings')->set('ui.show.advanced_column', TRUE)->save();

    $account = $this->drupalCreateUser(['administer views']);
    $this->drupalLogin($account);
  }
예제 #9
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     ViewTestData::createTestViews(get_class($this), ['views_test_config']);
     // Disable automatic live preview to make the sequence of calls clearer.
     \Drupal::configFactory()->getEditable('views.settings')->set('ui.always_live_preview', FALSE)->save();
     $this->account = $this->drupalCreateUser(['administer views']);
     $this->drupalLogin($this->account);
     NodeType::create(['type' => 'page'])->save();
     FieldConfig::create(['entity_type' => 'node', 'field_name' => 'body', 'bundle' => 'page'])->save();
 }
예제 #10
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     ViewTestData::createTestViews(self::class, ['views_test_config']);
     // Create a Content type and two test nodes.
     $this->createContentType(['type' => 'page']);
     $this->createNode(['title' => 'Page A', 'changed' => REQUEST_TIME]);
     $this->createNode(['title' => 'Page B', 'changed' => REQUEST_TIME + 1000]);
     // Create a user privileged enough to view content.
     $user = $this->drupalCreateUser(['administer site configuration', 'access content', 'access content overview']);
     $this->drupalLogin($user);
 }
예제 #11
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     ViewTestData::createTestViews(self::class, ['views_test_config']);
     // Create a Content type and eleven test nodes.
     $this->createContentType(['type' => 'page']);
     for ($i = 1; $i <= 11; $i++) {
         $this->createNode(['title' => 'Node ' . $i . ' content', 'changed' => $i * 1000]);
     }
     // Create a user privileged enough to view content.
     $user = $this->drupalCreateUser(['administer site configuration', 'access content', 'access content overview']);
     $this->drupalLogin($user);
 }
  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();

    // Create a Content type and two test nodes.
    $this->createContentType(['type' => 'page']);
    $this->createNode(['title' => 'Test page']);
    $this->createNode(['title' => 'Page test']);

    $user = $this->drupalCreateUser([
      'access content',
      'create page content',
    ]);
    $this->drupalLogin($user);
  }
예제 #13
0
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->adminUser = $this->drupalCreateUser(array_keys($this->container->get('user.permissions')->getPermissions()));
     $this->drupalLogin($this->adminUser);
     $this->createContentType(['type' => 'page']);
     \Drupal::configFactory()->getEditable('image.settings')->set('suppress_itok_output', TRUE)->save();
     // Assert access is denied without enabling the filter.
     $this->drupalGet('video-embed-wysiwyg/dialog/plain_text');
     $this->assertEquals(403, $this->getSession()->getStatusCode());
     // Enable the filter.
     $this->drupalGet('admin/config/content/formats/manage/plain_text');
     $this->find('[name="editor[editor]"]')->setValue('ckeditor');
     $this->assertSession()->assertWaitOnAjaxRequest();
     $this->submitForm(['filters[video_embed_wysiwyg][status]' => TRUE, 'filters[filter_html_escape][status]' => FALSE, 'editor[settings][toolbar][button_groups]' => '[[{"name":"Group","items":["video_embed","Source"]}]]'], t('Save configuration'));
     // Visit the modal again.
     $this->drupalGet('video-embed-wysiwyg/dialog/plain_text');
     $this->assertEquals(200, $this->getSession()->getStatusCode());
 }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->logWithRole(static::$defaultUserRole);
     // Set window width/height.
     $this->getSession()->getDriver()->resizeWindow(1280, 768);
 }
예제 #15
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $admin_user = $this->drupalCreateUser(['administer site configuration', 'administer views']);
     $this->drupalLogin($admin_user);
 }
예제 #16
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->setupEntityDisplays();
 }