function TaxonomyDefaultArgumentTest::testNodePath
Tests the relationship.
File
- 
              core/
modules/ taxonomy/ tests/ src/ Kernel/ Views/ TaxonomyDefaultArgumentTest.php, line 59  
Class
- TaxonomyDefaultArgumentTest
 - Tests the representative node relationship for terms.
 
Namespace
Drupal\Tests\taxonomy\Kernel\ViewsCode
public function testNodePath() : void {
  $view = $this->initViewWithRequest($this->nodes[0]
    ->toUrl()
    ->toString());
  $expected = implode(',', [
    $this->term1
      ->id(),
    $this->term2
      ->id(),
  ]);
  $this->assertEquals($expected, $view->argument['tid']
    ->getDefaultArgument());
  $this->assertEquals($this->nodes[0]
    ->getCacheTags(), $view->argument['tid']
    ->getPlugin('argument_default')
    ->getCacheTags());
  $view->destroy();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.