<?php
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
use Drupal\Core\Url;
use Drupal\user\Entity\Role;
*/
public static $testViews = ['test_view_status', 'test_page_display_menu', 'test_page_display_arguments'];
+ protected function setUp($import_test_views = TRUE) {
+ parent::setUp($import_test_views);
- protected function setUp() {
- parent::setUp();
-
- $this->drupalPlaceBlock('page_title_block');
+ $this->placeBlock('page_title_block');
}
/**
* failure. Failure also results in a failed assertion.
*/
public function clickViewsOperationLink($label, $unique_href_part) {
- $links = $this->xpath('//a[normalize-space(text())=:label]', [':label' => $label]);
+ $links = $this->xpath('//a[normalize-space(text())=:label]', [':label' => (string) $label]);
foreach ($links as $link_index => $link) {
- $position = strpos($link['href'], $unique_href_part);
+ $position = strpos($link->getAttribute('href'), $unique_href_part);
if ($position !== FALSE) {
$index = $link_index;
break;
}
$this->assertTrue(isset($index), format_string('Link to "@label" containing @part found.', ['@label' => $label, '@part' => $unique_href_part]));
if (isset($index)) {
- return $this->clickLink($label, $index);
+ return $this->clickLink((string) $label, $index);
}
else {
return FALSE;