function TestSiteInstallCommand::executeSetupClass
Same name in other branches
- 8.9.x core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php \Drupal\TestSite\Commands\TestSiteInstallCommand::executeSetupClass()
- 10 core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php \Drupal\TestSite\Commands\TestSiteInstallCommand::executeSetupClass()
- 11.x core/tests/Drupal/TestSite/Commands/TestSiteInstallCommand.php \Drupal\TestSite\Commands\TestSiteInstallCommand::executeSetupClass()
Uses the setup file to configure Drupal.
Parameters
string $class: The fully qualified class name, which should set up Drupal for tests. For example this class could create content types and fields or install modules. The class needs to implement TestSetupInterface.
See also
\Drupal\TestSite\TestSetupInterface
1 call to TestSiteInstallCommand::executeSetupClass()
- TestSiteInstallCommand::setup in core/
tests/ Drupal/ TestSite/ Commands/ TestSiteInstallCommand.php - Creates a test drupal installation.
File
-
core/
tests/ Drupal/ TestSite/ Commands/ TestSiteInstallCommand.php, line 250
Class
- TestSiteInstallCommand
- Command to create a test Drupal site.
Namespace
Drupal\TestSite\CommandsCode
protected function executeSetupClass($class) {
if (is_subclass_of($class, TestSetupInterface::class)) {
/** @var \Drupal\TestSite\TestSetupInterface $instance */
$instance = new $class();
$instance->setup();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.