<?php
-namespace Drupal\taxonomy\Tests\Views;
+namespace Drupal\Tests\taxonomy\Functional\Views;
use Drupal\field\Tests\EntityReference\EntityReferenceTestTrait;
use Drupal\taxonomy\Entity\Term;
use Drupal\taxonomy\Entity\Vocabulary;
+use Drupal\Tests\views_ui\Functional\UITestBase;
use Drupal\views\Tests\ViewTestData;
-use Drupal\views_ui\Tests\UITestBase;
use Drupal\views\Entity\View;
/**
/**
* {@inheritdoc}
*/
- protected function setUp() {
- parent::setUp();
+ protected function setUp($import_test_views = TRUE) {
+ parent::setUp($import_test_views);
$this->adminUser = $this->drupalCreateUser(['administer taxonomy', 'administer views']);
$this->drupalLogin($this->adminUser);
for ($j = 0; $j <= $i; $j++) {
$option = $result[$counter++];
$prefix = $this->terms[$i][$j]->parent->target_id ? '-' : '';
- $attributes = $option->attributes();
- $tid = (string) $attributes->value;
+ $tid = $option->getAttribute('value');
- $this->assertEqual($prefix . $this->terms[$i][$j]->getName(), (string) $option);
+ $this->assertEqual($prefix . $this->terms[$i][$j]->getName(), $option->getText());
$this->assertEqual($this->terms[$i][$j]->id(), $tid);
}
}
$display['display_options']['filters']['tid']['type'] = 'textfield';
$view->save();
$this->drupalGet('admin/structure/views/nojs/handler/test_filter_taxonomy_index_tid/default/filter/tid');
- $this->assertFieldByXPath('//input[@id="edit-options-value"]');
+ $this->assertFieldById('edit-options-value', NULL);
// Tests \Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid::calculateDependencies().
$expected = [