class HtmxAssetLoadTestSetup

Setup file used by tests/src/Nightwatch/Tests/htmxAssetLoadTest.js.

Hierarchy

Expanded class hierarchy of HtmxAssetLoadTestSetup

See also

\Drupal\Tests\Scripts\TestSiteApplicationTest

File

core/tests/Drupal/TestSite/HtmxAssetLoadTestSetup.php, line 15

Namespace

Drupal\TestSite
View source
class HtmxAssetLoadTestSetup implements TestSetupInterface {
    
    /**
     * {@inheritdoc}
     */
    public function setup() : void {
        // Install Olivero and set it as the default theme.
        $theme_installer = \Drupal::service('theme_installer');
        assert($theme_installer instanceof ThemeInstallerInterface);
        $theme_installer->install([
            'olivero',
        ], TRUE);
        $system_theme_config = \Drupal::configFactory()->getEditable('system.theme');
        $system_theme_config->set('default', 'olivero')
            ->save();
        // Install required modules.
        $module_installer = \Drupal::service('module_installer');
        assert($module_installer instanceof ModuleInstallerInterface);
        $module_installer->install([
            'test_htmx',
        ]);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
HtmxAssetLoadTestSetup::setup public function Overrides TestSetupInterface::setup

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.