Skip to content
Snippets Groups Projects
Commit 233f9caa authored by Jennifer Hodgdon's avatar Jennifer Hodgdon
Browse files

Issue #2287319 by martin107: Document exceptions thrown in KernelTestBase

parent 2c77fc29
No related branches found
No related tags found
No related merge requests found
...@@ -105,6 +105,10 @@ protected function beforePrepareEnvironment() { ...@@ -105,6 +105,10 @@ protected function beforePrepareEnvironment() {
* Create and set new configuration directories. * Create and set new configuration directories.
* *
* @see config_get_config_directory() * @see config_get_config_directory()
*
* @throws \RuntimeException
* Thrown when CONFIG_ACTIVE_DIRECTORY or CONFIG_STAGING_DIRECTORY cannot
* be created or made writable.
*/ */
protected function prepareConfigDirectories() { protected function prepareConfigDirectories() {
$this->configDirectories = array(); $this->configDirectories = array();
...@@ -294,6 +298,9 @@ public function containerBuild(ContainerBuilder $container) { ...@@ -294,6 +298,9 @@ public function containerBuild(ContainerBuilder $container) {
* *
* @param array $modules * @param array $modules
* A list of modules for which to install default configuration. * A list of modules for which to install default configuration.
*
* @throws \RuntimeException
* Thrown when any module listed in $modules is not enabled.
*/ */
protected function installConfig(array $modules) { protected function installConfig(array $modules) {
foreach ($modules as $module) { foreach ($modules as $module) {
...@@ -316,6 +323,10 @@ protected function installConfig(array $modules) { ...@@ -316,6 +323,10 @@ protected function installConfig(array $modules) {
* The name of the module that defines the table's schema. * The name of the module that defines the table's schema.
* @param string|array $tables * @param string|array $tables
* The name or an array of the names of the tables to install. * The name or an array of the names of the tables to install.
*
* @throws \RuntimeException
* Thrown when $module is not enabled or when the table schema cannot be
* found in the module specified.
*/ */
protected function installSchema($module, $tables) { protected function installSchema($module, $tables) {
// drupal_get_schema_unprocessed() is technically able to install a schema // drupal_get_schema_unprocessed() is technically able to install a schema
...@@ -356,6 +367,9 @@ protected function installSchema($module, $tables) { ...@@ -356,6 +367,9 @@ protected function installSchema($module, $tables) {
* *
* @param string $entity_type_id * @param string $entity_type_id
* The ID of the entity type. * The ID of the entity type.
*
* @throws \RuntimeException
* Thrown when the entity type does not support automatic schema installation.
*/ */
protected function installEntitySchema($entity_type_id) { protected function installEntitySchema($entity_type_id) {
/** @var \Drupal\Core\Entity\EntityManagerInterface $entity_manager */ /** @var \Drupal\Core\Entity\EntityManagerInterface $entity_manager */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment