diff --git a/web/modules/custom/example/tests/src/Unit/PostWrapperTest.php b/web/modules/custom/example/tests/src/Unit/PostWrapperTest.php index 9884d3d..868c15a 100644 --- a/web/modules/custom/example/tests/src/Unit/PostWrapperTest.php +++ b/web/modules/custom/example/tests/src/Unit/PostWrapperTest.php @@ -3,6 +3,7 @@ namespace Drupal\Tests\example\Unit; use Drupal\example\PostWrapper; +use Drupal\node\Entity\Node; use Drupal\node\NodeInterface; use Drupal\Tests\UnitTestCase; @@ -13,7 +14,7 @@ final class PostWrapperTest extends UnitTestCase { /** @test */ public function it_wraps_a_post(): void { - $node = $this->createMock(NodeInterface::class); + $node = Node::create(['type' => 'post']); $node->method('bundle')->willReturn('post'); $wrapper = new PostWrapper($node);