annotate core/tests/Drupal/TestSite/TestSetupInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 129ea1e6d783
children
rev   line source
Chris@17 1 <?php
Chris@17 2
Chris@17 3 namespace Drupal\TestSite;
Chris@17 4
Chris@17 5 /**
Chris@17 6 * Allows setting up an environment as part of a test site install.
Chris@17 7 *
Chris@17 8 * @see \Drupal\TestSite\Commands\TestSiteInstallCommand
Chris@17 9 */
Chris@17 10 interface TestSetupInterface {
Chris@17 11
Chris@17 12 /**
Chris@17 13 * Run the code to setup the test environment.
Chris@17 14 *
Chris@17 15 * You have access to any API provided by any installed module. For example,
Chris@17 16 * to install modules use:
Chris@17 17 * @code
Chris@17 18 * \Drupal::service('module_installer')->install(['my_module'])
Chris@17 19 * @endcode
Chris@17 20 *
Chris@17 21 * Check out TestSiteInstallTestScript for an example.
Chris@17 22 *
Chris@17 23 * @see \Drupal\TestSite\TestSiteInstallTestScript
Chris@17 24 */
Chris@17 25 public function setup();
Chris@17 26
Chris@17 27 }