diff --git a/src/Tests/EntityCloneBlockTest.php b/src/Tests/EntityCloneBlockTest.php
index cb4af2d..07295d5 100644
--- a/src/Tests/EntityCloneBlockTest.php
+++ b/src/Tests/EntityCloneBlockTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\entity_clone\Tests;
 
+use Drupal\block\Entity\Block;
 use Drupal\simpletest\WebTestBase;
 
 /**
@@ -51,18 +52,17 @@ class EntityCloneBlockTest extends WebTestBase {
   }
 
   public function testBlockEntityClone() {
-    $edit = [
-      'settings[label]' => 'Test block for clone',
-      'id' => 'test_block_for_clone',
-    ];
-    $this->drupalPostForm("admin/structure/block/add/local_actions_block/classy", $edit, t('Save block'));
-
-    $blocks = \Drupal::entityTypeManager()
-      ->getStorage('block')
-      ->loadByProperties([
-        'id' => $edit['id'],
-      ]);
-    $block = reset($blocks);
+    $config = \Drupal::configFactory();
+    $block = Block::create([
+      'plugin' => 'test_block',
+      'region' => 'sidebar_first',
+      'id' => 'test_block',
+      'theme' => $config->get('system.theme')->get('default'),
+      'label' => $this->randomMachineName(8),
+      'visibility' => [],
+      'weight' => 0,
+    ]);
+    $block->save();
 
     $edit = [
       'id' => 'test_block_cloned',
diff --git a/src/Tests/EntityCloneContentTest.php b/src/Tests/EntityCloneContentTest.php
index 04f1cb7..0e751fe 100644
--- a/src/Tests/EntityCloneContentTest.php
+++ b/src/Tests/EntityCloneContentTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\entity_clone\Tests;
 
+use Drupal\node\Entity\Node;
 use Drupal\node\Tests\NodeTestBase;
 
 /**
@@ -52,31 +53,19 @@ class EntityCloneContentTest extends NodeTestBase {
   }
 
   public function testContentEntityClone() {
-    $title_key = 'title[0][value]';
-    $body_key = 'body[0][value]';
-    // Create node to edit.
-
-    $edit = array();
-    $edit[$title_key] = $this->randomMachineName(8);
-    $edit[$body_key] = $this->randomMachineName(16);
-    $this->drupalPostForm('node/add/page', $edit, t('Save and publish'));
-
-    $nodes = \Drupal::entityTypeManager()
-      ->getStorage('node')
-      ->loadByProperties([
-        'title' => $edit[$title_key],
-        'body' => $edit[$body_key],
-      ]);
-    $node = reset($nodes);
-    $this->assertTrue($node, 'Test node for clone found in database.');
+    $node_title = $this->randomMachineName(8);
+    $node = Node::create([
+      'type' => 'page',
+      'title' => $node_title,
+    ]);
+    $node->save();
 
     $this->drupalPostForm('entity_clone/node/' . $node->id(), [], t('Clone'));
 
     $nodes = \Drupal::entityTypeManager()
       ->getStorage('node')
       ->loadByProperties([
-        'title' => $edit[$title_key] . ' - Cloned',
-        'body' => $edit[$body_key],
+        'title' => $node_title . ' - Cloned',
       ]);
     $node = reset($nodes);
     $this->assertTrue($node, 'Test node cloned found in database.');
diff --git a/src/Tests/EntityCloneSearchPageTest.php b/src/Tests/EntityCloneSearchPageTest.php
index 484d0e3..24cee53 100644
--- a/src/Tests/EntityCloneSearchPageTest.php
+++ b/src/Tests/EntityCloneSearchPageTest.php
@@ -56,7 +56,7 @@ class EntityCloneSearchPageTest extends WebTestBase {
       'id' => 'test_search_page_for_clone',
       'path' => 'test_search_page_for_clone_url',
     ];
-    $this->drupalPostForm("/admin/config/search/pages/add/node_search", $edit, t('Add search page'));
+    $this->drupalPostForm("/admin/config/search/pages/add/node_search", $edit, t('Save'));
 
     $search_pages = \Drupal::entityTypeManager()
       ->getStorage('search_page')
