<?php
-namespace Drupal\views_ui\Tests;
-
-use Drupal\views\Tests\ViewTestBase;
+namespace Drupal\Tests\views_ui\Functional;
/**
* Tests the views analyze system.
*
* @group views_ui
*/
-class AnalyzeTest extends ViewTestBase {
+class AnalyzeTest extends UITestBase {
/**
* Modules to enable.
*/
public static $testViews = ['test_view'];
- protected function setUp() {
- parent::setUp();
-
- $this->enableViewsTestModule();
-
- // Add an admin user will full rights;
- $this->admin = $this->drupalCreateUser(['administer views']);
- }
-
/**
* Tests that analyze works in general.
*/
public function testAnalyzeBasic() {
- $this->drupalLogin($this->admin);
+ $this->drupalLogin($this->adminUser);
$this->drupalGet('admin/structure/views/view/test_view/edit');
$this->assertLink(t('Analyze view'));
// This redirects the user to the analyze form.
$this->clickLink(t('Analyze view'));
- $this->assertText(t('View analysis'));
+ $this->assertSession()->titleEquals('View analysis | Drupal');
foreach (['ok', 'warning', 'error'] as $type) {
$xpath = $this->xpath('//div[contains(@class, :class)]', [':class' => $type]);