function ConfigExportCommandTest::commandTester
Builds a command tester for the 'config:export' command.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Config/ ConfigExportCommandTest.php, line 60
Class
- ConfigExportCommandTest
- Tests the 'config:export' command.
Namespace
Drupal\KernelTests\Core\ConfigCode
private function commandTester(?Settings $settings = NULL) : CommandTester {
// The SyncFactory service is private, so build it by hand.
$sync_factory = new SyncFactory($this->container
->getParameter('app.root'), $settings ?? Settings::getInstance(), $this->container
->get('config.storage'), $this->container
->get('extension.list.module'), $this->container
->get('extension.list.theme'), $this->container
->get('config.parsing_cache'));
$command = new ConfigExportCommand($this->container
->get('config.storage.export'), $sync_factory);
return new CommandTester($command);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.