From #2848952-61: Replace all calls to db_merge(), which is deprecated:
+++ b/core/tests/Drupal/KernelTests/Core/Database/DatabaseLegacyTest.php
@@ -172,4 +171,22 @@ public function testDbCreateTable() {
+ $result = db_merge('test_people')
+ ->key('job', 'Presenter')
+ ->fields([
+ 'age' => 31,
+ 'name' => 'Tiffany',
+ ])
+ ->execute();
Needs follow-up to change test to "instanceOf" assertion because we must test that this function returns declared object - but instead it tests that object works.