diff --git a/web/modules/custom/my_module/tests/src/Unit/Entity/PostTest.php b/web/modules/custom/my_module/tests/src/Unit/Entity/PostTest.php
index 4ab5273..11c990d 100644
--- a/web/modules/custom/my_module/tests/src/Unit/Entity/PostTest.php
+++ b/web/modules/custom/my_module/tests/src/Unit/Entity/PostTest.php
@@ -12,6 +12,10 @@ class PostTest extends UnitTestCase {
   public function it_returns_the_title() {
     $node = $this->createMock(NodeInterface::class);
 
+    $node->expects($this->once())
+      ->method('label')
+      ->willReturn('Test post');
+
     $post = new Post($node);
 
     $this->assertSame('Test post', $post->getTitle());