Loading core/modules/taxonomy/tests/src/Functional/Views/RelationshipNodeTermDataTest.php→core/modules/taxonomy/tests/src/Kernel/Views/RelationshipNodeTermDataTest.php +7 −9 Original line number Diff line number Diff line <?php namespace Drupal\Tests\taxonomy\Functional\Views; namespace Drupal\Tests\taxonomy\Kernel\Views; use Drupal\views\Views; use Drupal\views\ViewExecutable; Loading @@ -15,18 +15,17 @@ class RelationshipNodeTermDataTest extends TaxonomyTestBase { /** * Views used by this test. * * @var array * @var string[] */ public static $testViews = ['test_taxonomy_node_term_data']; /** * {@inheritdoc} * Tests relations limited by vocabulary. * * @covers \Drupal\taxonomy\Plugin\views\relationship\NodeTermData::calculateDependencies */ protected $defaultTheme = 'stark'; public function testViewsHandlerRelationshipNodeTermData() { public function testViewsHandlerRelationshipNodeTermData(): void { $view = Views::getView('test_taxonomy_node_term_data'); // Tests \Drupal\taxonomy\Plugin\views\relationship\NodeTermData::calculateDependencies(). $expected = [ 'config' => ['core.entity_view_mode.node.teaser'], 'module' => [ Loading Loading @@ -54,7 +53,6 @@ public function testViewsHandlerRelationshipNodeTermData() { ->save(); $view = Views::getView('test_taxonomy_node_term_data'); // Tests \Drupal\taxonomy\Plugin\views\relationship\NodeTermData::calculateDependencies(). $expected['config'][] = 'taxonomy.vocabulary.views_testing_tags'; $this->assertSame($expected, $view->getDependencies()); $this->executeView($view, [$this->term1->id(), $this->term2->id()]); Loading @@ -64,7 +62,7 @@ public function testViewsHandlerRelationshipNodeTermData() { /** * Tests that the 'taxonomy_term_access' tag is added to the Views query. */ public function testTag() { public function testTag(): void { // Change the view to test relation limited by vocabulary. $this->config('views.view.test_taxonomy_node_term_data') ->set('display.default.display_options.relationships.term_node_tid.vids', ['views_testing_tags']) Loading Loading
core/modules/taxonomy/tests/src/Functional/Views/RelationshipNodeTermDataTest.php→core/modules/taxonomy/tests/src/Kernel/Views/RelationshipNodeTermDataTest.php +7 −9 Original line number Diff line number Diff line <?php namespace Drupal\Tests\taxonomy\Functional\Views; namespace Drupal\Tests\taxonomy\Kernel\Views; use Drupal\views\Views; use Drupal\views\ViewExecutable; Loading @@ -15,18 +15,17 @@ class RelationshipNodeTermDataTest extends TaxonomyTestBase { /** * Views used by this test. * * @var array * @var string[] */ public static $testViews = ['test_taxonomy_node_term_data']; /** * {@inheritdoc} * Tests relations limited by vocabulary. * * @covers \Drupal\taxonomy\Plugin\views\relationship\NodeTermData::calculateDependencies */ protected $defaultTheme = 'stark'; public function testViewsHandlerRelationshipNodeTermData() { public function testViewsHandlerRelationshipNodeTermData(): void { $view = Views::getView('test_taxonomy_node_term_data'); // Tests \Drupal\taxonomy\Plugin\views\relationship\NodeTermData::calculateDependencies(). $expected = [ 'config' => ['core.entity_view_mode.node.teaser'], 'module' => [ Loading Loading @@ -54,7 +53,6 @@ public function testViewsHandlerRelationshipNodeTermData() { ->save(); $view = Views::getView('test_taxonomy_node_term_data'); // Tests \Drupal\taxonomy\Plugin\views\relationship\NodeTermData::calculateDependencies(). $expected['config'][] = 'taxonomy.vocabulary.views_testing_tags'; $this->assertSame($expected, $view->getDependencies()); $this->executeView($view, [$this->term1->id(), $this->term2->id()]); Loading @@ -64,7 +62,7 @@ public function testViewsHandlerRelationshipNodeTermData() { /** * Tests that the 'taxonomy_term_access' tag is added to the Views query. */ public function testTag() { public function testTag(): void { // Change the view to test relation limited by vocabulary. $this->config('views.view.test_taxonomy_node_term_data') ->set('display.default.display_options.relationships.term_node_tid.vids', ['views_testing_tags']) Loading