diff --git a/modules/core_event_dispatcher/tests/src/Kernel/Entity/EntityCreateAccessEventTest.php b/modules/core_event_dispatcher/tests/src/Kernel/Entity/EntityCreateAccessEventTest.php
index 052286c..42c85eb 100644
--- a/modules/core_event_dispatcher/tests/src/Kernel/Entity/EntityCreateAccessEventTest.php
+++ b/modules/core_event_dispatcher/tests/src/Kernel/Entity/EntityCreateAccessEventTest.php
@@ -75,7 +75,7 @@ class EntityCreateAccessEventTest extends KernelTestBase {
   /**
    * Data provider for testEntityCreateAccessEvent.
    */
-  public function entityCreateAccessEventProvider(): array {
+  public static function entityCreateAccessEventProvider(): array {
     return [
       [AccessResult::allowed(), TRUE],
       [AccessResult::forbidden(), FALSE],
diff --git a/modules/field_event_dispatcher/tests/src/Unit/Field/AbstractFormEntityDisplayEditAlterEventSubscriberTestCase.php b/modules/field_event_dispatcher/tests/src/Unit/Field/AbstractFormEntityDisplayEditAlterEventSubscriberTestCase.php
index 1958a19..58dec8b 100644
--- a/modules/field_event_dispatcher/tests/src/Unit/Field/AbstractFormEntityDisplayEditAlterEventSubscriberTestCase.php
+++ b/modules/field_event_dispatcher/tests/src/Unit/Field/AbstractFormEntityDisplayEditAlterEventSubscriberTestCase.php
@@ -38,6 +38,7 @@ abstract class AbstractFormEntityDisplayEditAlterEventSubscriberTestCase extends
    * Sets up the test.
    */
   protected function setUp(): void {
+    parent::setUp();
     $builder = new ContainerBuilder();
     $this->manager = new HookEventDispatcherManagerSpy();
     $builder->set('hook_event_dispatcher.manager', $this->manager);
diff --git a/modules/jsonapi_event_dispatcher/tests/src/Kernel/JsonApiEntityFieldFilterAccessEventTest.php b/modules/jsonapi_event_dispatcher/tests/src/Kernel/JsonApiEntityFieldFilterAccessEventTest.php
index 8fe3e95..51a458b 100644
--- a/modules/jsonapi_event_dispatcher/tests/src/Kernel/JsonApiEntityFieldFilterAccessEventTest.php
+++ b/modules/jsonapi_event_dispatcher/tests/src/Kernel/JsonApiEntityFieldFilterAccessEventTest.php
@@ -61,7 +61,7 @@ class JsonApiEntityFieldFilterAccessEventTest extends KernelTestBase {
    * @return array
    *   An array of test data.
    */
-  public function jsonapiEntityFieldFilterAccessEventProvider(): array {
+  public static function jsonapiEntityFieldFilterAccessEventProvider(): array {
     return [
       ['name'],
       ['created'],
diff --git a/modules/preprocess_event_dispatcher/tests/src/Unit/EntityEventTest.php b/modules/preprocess_event_dispatcher/tests/src/Unit/EntityEventTest.php
index 3459f63..dc74a4d 100644
--- a/modules/preprocess_event_dispatcher/tests/src/Unit/EntityEventTest.php
+++ b/modules/preprocess_event_dispatcher/tests/src/Unit/EntityEventTest.php
@@ -47,6 +47,7 @@ final class EntityEventTest extends TestCase {
    * {@inheritdoc}
    */
   protected function setUp(): void {
+    parent::setUp();
     $loader = YamlDefinitionsLoader::getInstance();
     $this->dispatcher = new SpyEventDispatcher();
     $this->service = new PreprocessEventService($this->dispatcher, $loader->getMapper());
diff --git a/modules/preprocess_event_dispatcher/tests/src/Unit/EntityEventVariablesTest.php b/modules/preprocess_event_dispatcher/tests/src/Unit/EntityEventVariablesTest.php
index 41760ee..1863be0 100644
--- a/modules/preprocess_event_dispatcher/tests/src/Unit/EntityEventVariablesTest.php
+++ b/modules/preprocess_event_dispatcher/tests/src/Unit/EntityEventVariablesTest.php
@@ -50,6 +50,7 @@ final class EntityEventVariablesTest extends TestCase {
    * {@inheritdoc}
    */
   protected function setUp(): void {
+    parent::setUp();
     $this->mapper = YamlDefinitionsLoader::getInstance()->getMapper();
     $this->viewMode = $this->randomMachineName();
   }
diff --git a/modules/preprocess_event_dispatcher/tests/src/Unit/FactoryMapperTest.php b/modules/preprocess_event_dispatcher/tests/src/Unit/FactoryMapperTest.php
index 265d23e..82494e5 100644
--- a/modules/preprocess_event_dispatcher/tests/src/Unit/FactoryMapperTest.php
+++ b/modules/preprocess_event_dispatcher/tests/src/Unit/FactoryMapperTest.php
@@ -30,6 +30,7 @@ final class FactoryMapperTest extends TestCase {
    * {@inheritdoc}
    */
   protected function setUp(): void {
+    parent::setUp();
     $this->mapper = YamlDefinitionsLoader::getInstance()->getMapper();
   }
 
diff --git a/modules/preprocess_event_dispatcher/tests/src/Unit/Helpers/SpyEventDispatcher.php b/modules/preprocess_event_dispatcher/tests/src/Unit/Helpers/SpyEventDispatcher.php
index cce244c..370fbed 100644
--- a/modules/preprocess_event_dispatcher/tests/src/Unit/Helpers/SpyEventDispatcher.php
+++ b/modules/preprocess_event_dispatcher/tests/src/Unit/Helpers/SpyEventDispatcher.php
@@ -123,7 +123,7 @@ final class SpyEventDispatcher implements EventDispatcherInterface {
    *
    * {@inheritdoc}
    */
-  public function getListeners(?string $eventName = NULL): array {
+  public function getListeners(string $eventName = NULL): array {
     throw new \BadMethodCallException('This spy does not support this call');
   }
 
@@ -141,7 +141,7 @@ final class SpyEventDispatcher implements EventDispatcherInterface {
    *
    * {@inheritdoc}
    */
-  public function hasListeners(?string $eventName = NULL): bool {
+  public function hasListeners(string $eventName = NULL): bool {
     throw new \BadMethodCallException('This spy does not support this call');
   }
 
diff --git a/modules/preprocess_event_dispatcher/tests/src/Unit/OtherEventTest.php b/modules/preprocess_event_dispatcher/tests/src/Unit/OtherEventTest.php
index 352da49..2df7cbc 100644
--- a/modules/preprocess_event_dispatcher/tests/src/Unit/OtherEventTest.php
+++ b/modules/preprocess_event_dispatcher/tests/src/Unit/OtherEventTest.php
@@ -55,6 +55,7 @@ final class OtherEventTest extends TestCase {
    * {@inheritdoc}
    */
   protected function setUp(): void {
+    parent::setUp();
     $loader = YamlDefinitionsLoader::getInstance();
     $this->dispatcher = new SpyEventDispatcher();
     $this->service = new PreprocessEventService($this->dispatcher, $loader->getMapper());
diff --git a/modules/preprocess_event_dispatcher/tests/src/Unit/OtherEventVariablesTest.php b/modules/preprocess_event_dispatcher/tests/src/Unit/OtherEventVariablesTest.php
index 4cb1624..7b23262 100644
--- a/modules/preprocess_event_dispatcher/tests/src/Unit/OtherEventVariablesTest.php
+++ b/modules/preprocess_event_dispatcher/tests/src/Unit/OtherEventVariablesTest.php
@@ -59,6 +59,7 @@ final class OtherEventVariablesTest extends TestCase {
    * {@inheritdoc}
    */
   protected function setUp(): void {
+    parent::setUp();
     $this->mapper = YamlDefinitionsLoader::getInstance()->getMapper();
   }
 
diff --git a/tests/src/Unit/Plugin/Factory/EventFactoryTest.php b/tests/src/Unit/Plugin/Factory/EventFactoryTest.php
index 028e131..c79d9a8 100644
--- a/tests/src/Unit/Plugin/Factory/EventFactoryTest.php
+++ b/tests/src/Unit/Plugin/Factory/EventFactoryTest.php
@@ -34,7 +34,7 @@ class EventFactoryTest extends TestCase {
     $this->assertInstanceOf($class, $instance);
   }
 
-  public function createInstanceProvider(): \Generator {
+  public static function createInstanceProvider(): \Generator {
     $eventFactory = new class() implements EventFactoryInterface {
 
       use EventFactoryTrait;
