diff --git a/core/tests/Drupal/Tests/KernelTestBase.php b/core/tests/Drupal/Tests/KernelTestBase.php index 238c3d9..8d5f56d 100644 --- a/core/tests/Drupal/Tests/KernelTestBase.php +++ b/core/tests/Drupal/Tests/KernelTestBase.php @@ -293,7 +293,7 @@ private function bootKernel() { // Copy the testing-specific service overrides in place. $testing_services_file = $this->root . '/' . $this->siteDirectory . '/services.yml'; copy($settings_services_file, $testing_services_file); - $this->settingsSet('container_yamls', [$testing_services_file]); + $this->setSetting('container_yamls', [$testing_services_file]); } // Allow for global test environment overrides. @@ -557,25 +557,6 @@ public function register(ContainerBuilder $container) { $container->getDefinition('password') ->setArguments(array(1)); } - - // @todo Remove this BC layer. - $defined_class = new \ReflectionMethod($this, 'containerBuild'); - $defined_class = $defined_class->getDeclaringClass()->name; - - if (__CLASS__ !== $defined_class) { - $this->containerBuild($container); - trigger_error('Use ::register() instead', E_USER_DEPRECATED); - } - } - - /** - * BC alias for register(). - * - * @deprecated in Drupal 8.0.x, will be removed before Drupal 8.0.0. - * - * @see \Drupal\Tests\KernelTestBase::register() - */ - public function containerBuild(ContainerBuilder $container) { } /** @@ -685,7 +666,7 @@ protected function installConfig($modules) { * If $module is not enabled or the table schema cannot be found. */ protected function installSchema($module, $tables) { - // drupal_get_schema_unprocessed() is technically able to install a schema + // drupal_get_module_schema() is technically able to install a schema // of a non-enabled module, but its ability to load the module's .install // file depends on many other factors. To prevent differences in test // behavior and non-reproducible test failures, we only allow the schema of @@ -695,17 +676,12 @@ protected function installSchema($module, $tables) { } $tables = (array) $tables; foreach ($tables as $table) { - $schema = drupal_get_schema_unprocessed($module, $table); + $schema = drupal_get_module_schema($module, $table); if (empty($schema)) { throw new \LogicException("$module module does not define a schema for table '$table'."); } $this->container->get('database')->schema()->createTable($table, $schema); } - - // Refresh the schema cache to make drupal_get_schema() aware of the newly - // installed schema. - // @todo Refactor Schema API to make this obsolete. - drupal_get_schema(NULL, TRUE); } /** @@ -888,18 +864,6 @@ protected function setSetting($name, $value) { } /** - * BC alias for setSetting(). - * - * @deprecated in Drupal 8.0.x, will be removed before Drupal 8.0.0. - * - * @see \Drupal\Tests\KernelTestBase::setSetting() - */ - protected function settingsSet($name, $value) { - trigger_error(sprintf("KernelTestBase::%s() is deprecated. Use setSetting() instead.", __FUNCTION__), E_DEPRECATED); - $this->setSetting($name, $value); - } - - /** * Returns a ConfigImporter object to import test configuration. * * @return \Drupal\Core\Config\ConfigImporter @@ -1026,7 +990,7 @@ protected function isTestInIsolation() { * Test authors should follow the provided instructions and adjust their tests * accordingly. * - * @deprecated in Drupal 8.0.x, will be removed before Drupal 8.0.0. + * @deprecated in Drupal 8.0.x, will be removed before Drupal 8.2.0. */ public function __get($name) { if (in_array($name, array(