diff --git a/tests/src/Functional/FivestarTest.php b/tests/src/Functional/FivestarTest.php
index 7f69f0b..47672e8 100644
--- a/tests/src/Functional/FivestarTest.php
+++ b/tests/src/Functional/FivestarTest.php
@@ -48,7 +48,7 @@ class FivestarTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     // Create content type for testing.
@@ -142,7 +142,7 @@ class FivestarTest extends BrowserTestBase {
     // Rate the test_node_type.
     $this->drupalLogin($this->voterUser);
     $this->drupalGet('node/' . $node->id());
-    $this->assertRaw('No votes yet', 'Fivestar field has no votes.');
+    $this->assertSession()->responseContains('No votes yet');
     $this->assertEmpty($this->xpath("//form[contains(@class, 'fivestar-widget')]"));
 
     // Check if node with attached fivestar field can be save.
diff --git a/tests/src/FunctionalJavascript/FivestarAjaxTestBase.php b/tests/src/FunctionalJavascript/FivestarAjaxTestBase.php
index 82487e4..e9a07f9 100644
--- a/tests/src/FunctionalJavascript/FivestarAjaxTestBase.php
+++ b/tests/src/FunctionalJavascript/FivestarAjaxTestBase.php
@@ -47,7 +47,7 @@ abstract class FivestarAjaxTestBase extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     // Create content type for testing.
diff --git a/tests/src/Kernel/HookFivestarWidgetsAlterTest.php b/tests/src/Kernel/HookFivestarWidgetsAlterTest.php
index 53c0c45..cd83e69 100644
--- a/tests/src/Kernel/HookFivestarWidgetsAlterTest.php
+++ b/tests/src/Kernel/HookFivestarWidgetsAlterTest.php
@@ -30,7 +30,7 @@ class HookFivestarWidgetsAlterTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->widgetManager = $this->container->get('fivestar.widget_manager');
diff --git a/tests/src/Kernel/HookFivestarWidgetsTest.php b/tests/src/Kernel/HookFivestarWidgetsTest.php
index 88bc193..0ac0146 100644
--- a/tests/src/Kernel/HookFivestarWidgetsTest.php
+++ b/tests/src/Kernel/HookFivestarWidgetsTest.php
@@ -30,7 +30,7 @@ class HookFivestarWidgetsTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->widgetManager = $this->container->get('fivestar.widget_manager');
