TaxonomyDefaultArgumentTest.php

Same filename in this branch
  1. main core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php
Same filename and directory in other branches
  1. 11.x core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php
  2. 11.x core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php
  3. 10 core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php
  4. 10 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php
  5. 9 core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php
  6. 9 core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php
  7. 8.9.x core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php
  8. 8.9.x core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php

Namespace

Drupal\Tests\taxonomy\Functional\Views

File

core/modules/taxonomy/tests/src/Functional/Views/TaxonomyDefaultArgumentTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\taxonomy\Functional\Views;

use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
 * Tests the representative node relationship for terms.
 */
class TaxonomyDefaultArgumentTest extends TaxonomyTestBase {
  
  /**
   * Views used by this test.
   *
   * @var array
   */
  public static $testViews = [
    'taxonomy_default_argument_test',
  ];
  
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  
  /**
   * Tests escaping of page title when the taxonomy plugin provides it.
   */
  public function testTermTitleEscaping() : void {
    $this->term1
      ->setName('<em>Markup</em>')
      ->save();
    $this->drupalGet('taxonomy_default_argument_test/' . $this->term1
      ->id());
    $this->assertSession()
      ->assertEscaped($this->term1
      ->label());
  }

}

Classes

Title Deprecated Summary
TaxonomyDefaultArgumentTest Tests the representative node relationship for terms.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.