function ConfigExportCommandTest::testUndefinedSyncDirectory
Tests the command fails cleanly when no sync directory is defined.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Config/ ConfigExportCommandTest.php, line 77
Class
- ConfigExportCommandTest
- Tests the 'config:export' command.
Namespace
Drupal\KernelTests\Core\ConfigCode
public function testUndefinedSyncDirectory() : void {
$settings = Settings::getAll();
unset($settings['config_sync_directory']);
$tester = $this->commandTester(new Settings($settings));
self::assertSame(Command::FAILURE, $tester->execute([
'--yes' => TRUE,
]));
self::assertStringContainsString('config sync directory is not defined', $tester->getDisplay());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.