You are here

public function TaxonomyDefaultArgumentTest::testTermPath in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php \Drupal\Tests\taxonomy\Kernel\Views\TaxonomyDefaultArgumentTest::testTermPath()

File

core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyDefaultArgumentTest.php, line 86

Class

TaxonomyDefaultArgumentTest
Tests the representative node relationship for terms.

Namespace

Drupal\Tests\taxonomy\Kernel\Views

Code

public function testTermPath() {
  $view = $this
    ->initViewWithRequest($this->term1
    ->toUrl()
    ->toString());
  $expected = $this->term1
    ->id();
  $this
    ->assertEqual($expected, $view->argument['tid']
    ->getDefaultArgument());
}