currency-8.x-3.3/modules/currency_intl/tests/src/Functional/ModuleInstallUninstallWebTest.php

modules/currency_intl/tests/src/Functional/ModuleInstallUninstallWebTest.php
<?php

namespace Drupal\Tests\currency_intl\Functional;

use Drupal\Tests\BrowserTestBase;

/**
 * Module installation and uninstallation.
 *
 * @group Currency Intl
 */
class ModuleInstallUninstallWebTest extends BrowserTestBase {

  /**
   * {@inheritdoc}
   */
  protected static $modules = ['currency_intl'];

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';

  /**
   * Test uninstall.
   */
  public function testUninstallation() {
    /** @var \Drupal\Core\Extension\ModuleInstallerInterface $module_installer */
    $module_installer = \Drupal::service('module_installer');
    $module_handler = \Drupal::moduleHandler();
    $this->assertTrue($module_handler->moduleExists('currency_intl'));
    $module_installer->uninstall(['currency_intl']);
    $this->assertFalse($module_handler->moduleExists('currency_intl'));
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc