diff -u b/core/modules/block/src/Tests/BlockTest.php b/core/modules/block/src/Tests/BlockTest.php --- b/core/modules/block/src/Tests/BlockTest.php +++ b/core/modules/block/src/Tests/BlockTest.php @@ -485,11 +485,8 @@ * Tests block_node_type_delete. */ public function testBlockNodeTypeDelete() { - $node_type1 = NodeType::create(['id' => 'test_nodetype1', 'name' => $this->randomString()]); - $node_type1->save(); - - $node_type2 = NodeType::create(['id' => 'test_nodetype2', 'name' => $this->randomString()]); - $node_type2->save(); + $node_type1 = $this->drupalCreateContentType(); + $node_type2 = $this->drupalCreateContentType(); $block = Block::create([ 'id' => $this->randomMachineName(),