diff --git a/core/tests/Drupal/KernelTests/Core/Database/MergeTest.php b/core/tests/Drupal/KernelTests/Core/Database/MergeTest.php index 9a5688c..f76fd7c 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/MergeTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/MergeTest.php @@ -9,11 +9,14 @@ * Tests the MERGE query builder. * * @group Database + * @group legacy */ class MergeTest extends DatabaseTestBase { /** * Confirms that we can merge-insert a record successfully. + * + * @expectedDeprecation Deprecated as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get a database connection injected into your service from the container and call merge() on it. For example, $injected_database->merge($table, $options); */ public function testMergeInsert() { $num_records_before = db_query('SELECT COUNT(*) FROM {test_people}')->fetchField(); @@ -39,6 +42,8 @@ public function testMergeInsert() { /** * Confirms that we can merge-update a record successfully. + * + * @expectedDeprecation Deprecated as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get a database connection injected into your service from the container and call merge() on it. For example, $injected_database->merge($table, $options); */ public function testMergeUpdate() { $num_records_before = db_query('SELECT COUNT(*) FROM {test_people}')->fetchField(); @@ -67,6 +72,8 @@ public function testMergeUpdate() { * * This test varies from the previous test because it manually defines which * fields are inserted, and which fields are updated. + * + * @expectedDeprecation Deprecated as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get a database connection injected into your service from the container and call merge() on it. For example, $injected_database->merge($table, $options); */ public function testMergeUpdateExcept() { $num_records_before = db_query('SELECT COUNT(*) FROM {test_people}')->fetchField(); @@ -88,6 +95,8 @@ public function testMergeUpdateExcept() { /** * Confirms that we can merge-update a record, with alternate replacement. + * + * @expectedDeprecation Deprecated as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get a database connection injected into your service from the container and call merge() on it. For example, $injected_database->merge($table, $options); */ public function testMergeUpdateExplicit() { $num_records_before = db_query('SELECT COUNT(*) FROM {test_people}')->fetchField(); @@ -114,6 +123,8 @@ public function testMergeUpdateExplicit() { /** * Confirms that we can merge-update a record successfully, with expressions. + * + * @expectedDeprecation Deprecated as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get a database connection injected into your service from the container and call merge() on it. For example, $injected_database->merge($table, $options); */ public function testMergeUpdateExpression() { $num_records_before = db_query('SELECT COUNT(*) FROM {test_people}')->fetchField(); @@ -143,6 +154,8 @@ public function testMergeUpdateExpression() { /** * Tests that we can merge-insert without any update fields. + * + * @expectedDeprecation Deprecated as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get a database connection injected into your service from the container and call merge() on it. For example, $injected_database->merge($table, $options); */ public function testMergeInsertWithoutUpdate() { $num_records_before = db_query('SELECT COUNT(*) FROM {test_people}')->fetchField(); @@ -162,6 +175,8 @@ public function testMergeInsertWithoutUpdate() { /** * Confirms that we can merge-update without any update fields. + * + * @expectedDeprecation Deprecated as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get a database connection injected into your service from the container and call merge() on it. For example, $injected_database->merge($table, $options); */ public function testMergeUpdateWithoutUpdate() { $num_records_before = db_query('SELECT COUNT(*) FROM {test_people}')->fetchField(); @@ -194,6 +209,8 @@ public function testMergeUpdateWithoutUpdate() { /** * Tests that an invalid merge query throws an exception. + * + * @expectedDeprecation Deprecated as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get a database connection injected into your service from the container and call merge() on it. For example, $injected_database->merge($table, $options); */ public function testInvalidMerge() { try {