Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / views_ui / tests / src / Functional / AnalyzeTest.php
similarity index 70%
rename from web/core/modules/views_ui/src/Tests/AnalyzeTest.php
rename to web/core/modules/views_ui/tests/src/Functional/AnalyzeTest.php
index 83e25313d67c1219d85280dd2ca2404e01018876..32d1ae98023cd059cc3e4b0e5bbfe9a985c87b6c 100644 (file)
@@ -1,15 +1,13 @@
 <?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.
@@ -25,27 +23,18 @@ class AnalyzeTest extends ViewTestBase {
    */
   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]);