From 233f9caa75fd4ee64806ce01316b1e4cc901bdf0 Mon Sep 17 00:00:00 2001 From: Jennifer Hodgdon <yahgrp@poplarware.com> Date: Fri, 20 Jun 2014 10:47:00 -0700 Subject: [PATCH] Issue #2287319 by martin107: Document exceptions thrown in KernelTestBase --- core/modules/simpletest/src/KernelTestBase.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/modules/simpletest/src/KernelTestBase.php b/core/modules/simpletest/src/KernelTestBase.php index ec34c53b08d7..a695d2333524 100644 --- a/core/modules/simpletest/src/KernelTestBase.php +++ b/core/modules/simpletest/src/KernelTestBase.php @@ -105,6 +105,10 @@ protected function beforePrepareEnvironment() { * Create and set new configuration directories. * * @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() { $this->configDirectories = array(); @@ -294,6 +298,9 @@ public function containerBuild(ContainerBuilder $container) { * * @param array $modules * 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) { foreach ($modules as $module) { @@ -316,6 +323,10 @@ protected function installConfig(array $modules) { * The name of the module that defines the table's schema. * @param string|array $tables * 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) { // drupal_get_schema_unprocessed() is technically able to install a schema @@ -356,6 +367,9 @@ protected function installSchema($module, $tables) { * * @param string $entity_type_id * 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) { /** @var \Drupal\Core\Entity\EntityManagerInterface $entity_manager */ -- GitLab