TestPreinstallInterface.php 702 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Drupal\TestSite;
  3. /**
  4. * Allows running code prior to a test site install.
  5. *
  6. * @see \Drupal\TestSite\Commands\TestSiteInstallCommand
  7. */
  8. interface TestPreinstallInterface {
  9. /**
  10. * Runs code prior to a test site install.
  11. *
  12. * This method is run after FunctionalTestSetupTrait::prepareEnvironment()
  13. * but before Drupal is installed. As such, there is limited setup of the
  14. * environment and no Drupal API is available.
  15. *
  16. * @param string $db_prefix
  17. * The database prefix.
  18. * @param string $site_directory
  19. * The site directory.
  20. *
  21. * @see \Drupal\TestSite\TestSiteInstallTestScript
  22. */
  23. public function preinstall($db_prefix, $site_directory);
  24. }