Mercurial > hg > isophonics-drupal-site
view core/modules/media/tests/src/Functional/MediaInstallTest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line source
<?php namespace Drupal\Tests\media\Functional; use Drupal\Tests\BrowserTestBase; /** * Tests media Install / Uninstall logic. * * @group media */ class MediaInstallTest extends BrowserTestBase { /** * {@inheritdoc} */ public static $modules = ['media']; /** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->drupalLogin($this->drupalCreateUser(['administer modules'])); } /** * Tests reinstalling after being uninstalled. */ public function testReinstallAfterUninstall() { $page = $this->getSession()->getPage(); $assert_session = $this->assertSession(); // Uninstall the media module. $this->container->get('module_installer')->uninstall(['media'], FALSE); $this->drupalGet('/admin/modules'); $page->checkField('modules[media][enable]'); $page->pressButton('Install'); $assert_session->pageTextNotContains('could not be moved/copied because a file by that name already exists in the destination directory'); $assert_session->pageTextContains('Module Media has been enabled'); } }