diff --git a/core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php b/core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php index a07da59..95fb9ce 100644 --- a/core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php +++ b/core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php @@ -7,6 +7,7 @@ namespace Drupal\config\Tests; +use Drupal\config_test\Entity\ConfigTest; use Drupal\simpletest\WebTestBase; /** @@ -39,7 +40,7 @@ public function testFormsWithOverrides() { $this->writeSettings($settings); // Test that the overridden label is loaded with the entity. - $this->assertEqual(config_test_load('dotted.default')->label(), $overridden_label); + $this->assertEqual(ConfigTest::load('dotted.default')->label(), $overridden_label); // Test that the original label on the listing page is intact. $this->drupalGet('admin/structure/config_test'); @@ -67,7 +68,7 @@ public function testFormsWithOverrides() { $this->assertIdentical((string) $elements[0]['value'], $edited_label); // Test that the overridden label is still loaded with the entity. - $this->assertEqual(config_test_load('dotted.default')->label(), $overridden_label); + $this->assertEqual(ConfigTest::load('dotted.default')->label(), $overridden_label); } } diff --git a/core/modules/config/tests/config_test/config_test.module b/core/modules/config/tests/config_test/config_test.module index d7742d0..441c4c6 100644 --- a/core/modules/config/tests/config_test/config_test.module +++ b/core/modules/config/tests/config_test/config_test.module @@ -11,16 +11,6 @@ require_once dirname(__FILE__) . '/config_test.hooks.inc'; /** - * Loads a ConfigTest object. - * - * @param string $id - * The ID of the ConfigTest object to load. - */ -function config_test_load($id) { - return entity_load('config_test', $id); -} - -/** * Implements hook_cache_flush(). */ function config_test_cache_flush() { diff --git a/core/modules/config/tests/config_test/src/ConfigTestForm.php b/core/modules/config/tests/config_test/src/ConfigTestForm.php index 56195e2..3304329 100644 --- a/core/modules/config/tests/config_test/src/ConfigTestForm.php +++ b/core/modules/config/tests/config_test/src/ConfigTestForm.php @@ -33,7 +33,7 @@ public function form(array $form, FormStateInterface $form_state) { '#default_value' => $entity->id(), '#required' => TRUE, '#machine_name' => array( - 'exists' => 'config_test_load', + 'exists' => $this->entity->getEntityType()->getClass() . '::load', 'replace_pattern' => '[^a-z0-9_.]+', ), ); diff --git a/core/modules/config/tests/config_test/src/Entity/ConfigQueryTest.php b/core/modules/config/tests/config_test/src/Entity/ConfigQueryTest.php index 022b1f1..c734568 100644 --- a/core/modules/config/tests/config_test/src/Entity/ConfigQueryTest.php +++ b/core/modules/config/tests/config_test/src/Entity/ConfigQueryTest.php @@ -21,6 +21,7 @@ * } * }, * config_prefix = "query", + * class = "Drupal\config_test\Entity\ConfigQueryTest", * entity_keys = { * "id" = "id", * "label" = "label" diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php index a2f6a6c..adda0a6 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php +++ b/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php @@ -8,6 +8,7 @@ namespace Drupal\config_translation\Tests; use Drupal\Component\Utility\SafeMarkup; +use Drupal\config_test\Entity\ConfigTest; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\simpletest\WebTestBase; @@ -135,7 +136,7 @@ public function testListingPageWithOverrides() { $this->writeSettings($settings); // Test that the overridden label is loaded with the entity. - $this->assertEqual(config_test_load('dotted.default')->label(), $overridden_label); + $this->assertEqual(ConfigTest::load('dotted.default')->label(), $overridden_label); // Test that the original label on the listing page is intact. $this->drupalGet('admin/config/regional/config-translation/config_test');