diff --git a/tests/src/Functional/CommandTest.php b/tests/src/Functional/CommandTest.php
index c8ac1f6b3a51405f8e7884f13f7b66ac9b3446db..083a5d541eb8790ca7a31a3b71dc496fc3edac24 100644
--- a/tests/src/Functional/CommandTest.php
+++ b/tests/src/Functional/CommandTest.php
@@ -27,7 +27,7 @@ class CommandTest extends BrowserTestBase {
   protected static $modules = ['rokka', 'image'];
 
   /**
-   * Test service availability.
+   * Tests service availability.
    */
   public function testLoad(): void {
     // No styles exist, so no action to perform.
diff --git a/tests/src/Kernel/FileAccessTest.php b/tests/src/Kernel/FileAccessTest.php
index 5e9b02fda02e158656c782bfc5eb22cf0a792244..bb6847313b3d7b075d2215b078c81a53eb0fc7e8 100644
--- a/tests/src/Kernel/FileAccessTest.php
+++ b/tests/src/Kernel/FileAccessTest.php
@@ -66,7 +66,7 @@ class FileAccessTest extends KernelTestBase {
       'uid' => 1,
       'filename' => 'test.jpg',
       'uri' => 'rokka://test.jpg',
-      'status' => FILE_STATUS_PERMANENT,
+      'status' => FileInterface::STATUS_PERMANENT,
     ]);
     $this->file->save();
   }
diff --git a/tests/src/Kernel/ImageStyleFormTest.php b/tests/src/Kernel/ImageStyleFormTest.php
index 6f9bdff71191b15f73639cf794a79ae747ad5900..d9ae5aa77383a6f7b4183d124dab35e4499ddfcb 100644
--- a/tests/src/Kernel/ImageStyleFormTest.php
+++ b/tests/src/Kernel/ImageStyleFormTest.php
@@ -31,7 +31,7 @@ class ImageStyleFormTest extends KernelTestBase {
   }
 
   /**
-   * Test the service.
+   * Tests the service.
    */
   public function testPresave(): void {
     $style = ImageStyle::create(['name' => 'my_style']);
@@ -68,7 +68,7 @@ class ImageStyleFormTest extends KernelTestBase {
     $options = $stack->getStackOptions();
     self::assertEquals(12, $options['jpg_quality']);
     self::assertEquals(100, $options['webp_quality']);
-    self::assertEquals(TRUE, $options['autoformat']);
+    self::assertTrue($options['autoformat']);
 
     $style->set(
       'rokka_stack_options',
@@ -85,7 +85,7 @@ class ImageStyleFormTest extends KernelTestBase {
     $options = $stack->getStackOptions();
     self::assertEquals(0, $options['jpg_quality']);
     self::assertEquals(0, $options['webp_quality']);
-    self::assertEquals(FALSE, $options['autoformat']);
+    self::assertFalse($options['autoformat']);
   }
 
 }
diff --git a/tests/src/Kernel/ServiceTest.php b/tests/src/Kernel/ServiceTest.php
index af0f35d208d3302207b8fcc54764473cb4b8f130..fd65126ca814e453e31751bb635dfe07d1116471 100644
--- a/tests/src/Kernel/ServiceTest.php
+++ b/tests/src/Kernel/ServiceTest.php
@@ -22,18 +22,14 @@ class ServiceTest extends KernelTestBase {
   protected static $modules = ['rokka', 'user', 'field'];
 
   /**
-   * Rokka service.
-   *
-   * @var \Drupal\rokka\RokkaService
+   * The Rokka service.
    */
-  protected $rokka;
+  protected ?RokkaService $rokka;
 
   /**
-   * Metadata.
-   *
-   * @var \Drupal\rokka\Entity\RokkaMetadata
+   * The Rokka metadata.
    */
-  protected $exampleMetadata;
+  protected ?RokkaMetadata $exampleMetadata;
 
   /**
    * {@inheritdoc}
@@ -59,7 +55,7 @@ class ServiceTest extends KernelTestBase {
   }
 
   /**
-   * Test the service.
+   * Tests the service.
    */
   public function testServiceBase(): void {
     $this->assertInstanceOf(RokkaService::class, $this->rokka);
@@ -67,7 +63,7 @@ class ServiceTest extends KernelTestBase {
   }
 
   /**
-   * Test the metadata.
+   * Tests the metadata.
    */
   public function testMetadata(): void {
     $matchingMetadata = $this->rokka->loadRokkaMetadataByUri($this->exampleMetadata->get('uri')->value);