Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / workspaces / tests / src / Functional / WorkspacesUninstallTest.php
1 <?php
2
3 namespace Drupal\Tests\workspaces\Functional;
4
5 use Drupal\Tests\BrowserTestBase;
6
7 /**
8  * Tests uninstalling the Workspaces module.
9  *
10  * @group workspaces
11  */
12 class WorkspacesUninstallTest extends BrowserTestBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   protected $profile = 'standard';
18
19   /**
20    * {@inheritdoc}
21    */
22   public static $modules = ['workspaces'];
23
24   /**
25    * Tests deleting workspace entities and uninstalling Workspaces module.
26    */
27   public function testUninstallingWorkspace() {
28     $this->drupalLogin($this->rootUser);
29     $this->drupalGet('/admin/modules/uninstall');
30     $session = $this->assertSession();
31     $session->linkExists('Remove workspaces');
32     $this->clickLink('Remove workspaces');
33     $session->pageTextContains('Are you sure you want to delete all workspaces?');
34     $this->drupalPostForm('/admin/modules/uninstall/entity/workspace', [], 'Delete all workspaces');
35     $this->drupalPostForm('admin/modules/uninstall', ['uninstall[workspaces]' => TRUE], 'Uninstall');
36     $this->drupalPostForm(NULL, [], 'Uninstall');
37     $session->pageTextContains('The selected modules have been uninstalled.');
38     $session->pageTextNotContains('Workspaces');
39   }
40
41 }