improvements-2.x-dev/modules/improvements_title/tests/src/Functional/ImprovementsTitleTest.php

modules/improvements_title/tests/src/Functional/ImprovementsTitleTest.php
<?php

namespace Drupal\Tests\improvements_title\Functional;

use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\improvements\Traits\ImprovementsTestTrait;

class ImprovementsTitleTest extends BrowserTestBase {

  use ImprovementsTestTrait;

  /**
   * {@inheritDoc}
   */
  protected $defaultTheme = 'stark';

  /**
   * {@inheritDoc}
   */
  protected static $modules = ['improvements_title'];

  /**
   * {@inheritDoc}
   */
  protected function setUp(): void {
    parent::setUp();
  }

  /**
   * Test altering page title.
   *
   * @covers \Drupal\improvements\ImprovementsTrustedCallbacks
   */
  public function testPageTitleAlter(): void {
    $this->installModule('improvements_title_test');
    $this->drupalGet('/improvements-test/altered-route-title');
    $this->dontSeeErrorMessage();
    $this->assertSession()->elementTextContains('css', 'h1', 'Altered route title');
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc