Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html1/testsite/web/modules/contrib/metatag/tests/src/Functional/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : //var/www/html1/testsite/web/modules/contrib/metatag/tests/src/Functional/MetatagPanelizerTest.php

<?php

namespace Drupal\Tests\metatag\Functional;

use Drupal\Tests\BrowserTestBase;

/**
 * Verify that the JSON output from core works as intended.
 *
 * @group panelizer_metatag
 */
class MetatagPanelizerTest extends BrowserTestBase {

  // Contains helper methods.
  use MetatagHelperTrait;

  /**
   * {@inheritdoc}
   */
  public static $modules = [
    // Modules for core functionality.
    'node',
    'field',
    'field_ui',
    'user',

    // Contrib dependencies.
    'panelizer',
    'token',

    // This module.
    'metatag',
  ];

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'bartik';

  /**
   * Create an entity, view its JSON output, confirm Metatag data exists.
   */
  public function testPanelizerMetatagPreRender() {
    /* @var\Drupal\node\NodeInterface $node */
    $title = 'Panelizer Metatag Test Title';
    $body = 'Testing JSON output for a content type';
    $node = $this->createContentTypeNode($title, $body);
    $url = $node->toUrl();

    // Initiate session with a user who can manage metatags.
    $permissions = ['administer node display', 'administer meta tags'];
    $account = $this->drupalCreateUser($permissions);
    $this->drupalLogin($account);

    // Load the node's page.
    $this->drupalPostForm(
      'admin/structure/types/manage/metatag_test/display',
      ['panelizer[enable]' => TRUE],
      'Save'
    );

    $this->drupalGet('admin/structure/types/manage/metatag_test/display');
    $this->assertSession()->checkboxChecked('panelizer[enable]');

    $this->drupalGet($url);
    $this->assertSession()->elementContains('css', 'title', $title . ' | Drupal');
    $xpath = $this->xpath("//link[@rel='canonical']");
    self::assertEquals((string) $xpath[0]->getAttribute('href'), $url->toString());
    self::assertEquals(count($xpath), 1);
  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net