Verified Commit f557e918 authored by godotislate's avatar godotislate
Browse files

task: #3615570 Optimize GenericModuleTestBase

By: catch
By: nicxvan
(cherry picked from commit 7db0a117)
parent 3e54306f
Loading
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -26,6 +26,15 @@ abstract class GenericModuleTestBase extends BrowserTestBase {
   */
  protected $defaultTheme = 'stark';

  /**
   * {@inheritdoc}
   */
  protected function setUp(): void {
    $module = $this->getModule();
    static::$modules = array_merge(static::$modules, [$module]);
    parent::setUp();
  }

  /**
   * Get the module name.
   *
@@ -41,7 +50,6 @@ protected function getModule(): string {
   */
  public function testModuleGenericIssues(): void {
    $module = $this->getModule();
    \Drupal::service('module_installer')->install([$module]);
    $info = \Drupal::service('extension.list.module')->getExtensionInfo($module);
    if (!empty($info['required']) && !empty($info['hidden'])) {
      $this->markTestSkipped('Nothing to assert for hidden, required modules.');