diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/tests/Drupal/TestSite/TestSetupInterface.php	Thu Feb 28 13:11:55 2019 +0000
@@ -0,0 +1,27 @@
+<?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();
+
+}