diff --git a/core/modules/comment/tests/src/CommentLinkBuilderTest.php b/core/modules/comment/tests/src/CommentLinkBuilderTest.php
index 66ff397..628a5e1 100644
--- a/core/modules/comment/tests/src/CommentLinkBuilderTest.php
+++ b/core/modules/comment/tests/src/CommentLinkBuilderTest.php
@@ -62,7 +62,7 @@ class CommentLinkBuilderTest extends UnitTestCase {
   /**
    * Prepares mocks for the test.
    */
-  public function setUp() {
+  protected function setUp() {
     $this->commentManager = $this->getMock('\Drupal\comment\CommentManagerInterface');
     $this->stringTranslation = $this->getStringTranslationStub();
     $this->moduleHandler = $this->getMock('\Drupal\Core\Extension\ModuleHandlerInterface');
