protected function TestSiteInstallCommand::executeSetupClass in Drupal 8
Same name and namespace in other branches
- 9 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 215
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();
}
}