TestSetupInterface.php

Same filename in other branches
  1. 8.9.x core/tests/Drupal/TestSite/TestSetupInterface.php
  2. 10 core/tests/Drupal/TestSite/TestSetupInterface.php
  3. 11.x core/tests/Drupal/TestSite/TestSetupInterface.php

Namespace

Drupal\TestSite

File

core/tests/Drupal/TestSite/TestSetupInterface.php

View source
<?php

namespace Drupal\TestSite;


/**
 * Allows setting up an environment as part of a test site install.
 *
 * @see \Drupal\TestSite\Commands\TestSiteInstallCommand
 */
interface TestSetupInterface {
    
    /**
     * Run the code to setup the test environment.
     *
     * You have access to any API provided by any installed module. For example,
     * to install modules use:
     * @code
     * \Drupal::service('module_installer')->install(['my_module'])
     * @endcode
     *
     * Check out TestSiteInstallTestScript for an example.
     *
     * @see \Drupal\TestSite\TestSiteInstallTestScript
     */
    public function setup();

}

Interfaces

Title Deprecated Summary
TestSetupInterface Allows setting up an environment as part of a test site install.

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