diff --git a/tests/src/Kernel/TextDataTypeTest.php b/tests/src/Kernel/TextDataTypeTest.php
index 44b3ebd..8910c47 100644
--- a/tests/src/Kernel/TextDataTypeTest.php
+++ b/tests/src/Kernel/TextDataTypeTest.php
@@ -34,8 +34,8 @@ class TextDataTypeTest extends KernelTestBase {
 
     // Check that the new object is an instance of TypedDataInterface and of
     // StringInterface (not TextInterface).
-    $this->assertTrue($typed_data instanceof TypedDataInterface, 'Typed data object is an instance of the typed data interface.');
-    $this->assertTrue($typed_data instanceof StringInterface, 'Typed data object is an instance of StringInterface).');
+    $this->assertInstanceOf(TypedDataInterface::class, $typed_data, 'Typed data object is an instance of the typed data interface.');
+    $this->assertInstanceOf(StringInterface::class, $typed_data, 'Typed data object is an instance of StringInterface.');
 
     // Check basic get and set functionality.
     $this->assertTrue($typed_data->getValue() === $value, 'Text value was fetched.');
