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