diff --git a/Tests/Integration/IndexQueue/RecordMonitorTest.php b/Tests/Integration/IndexQueue/RecordMonitorTest.php
index <HASH>..<HASH> 100644
--- a/Tests/Integration/IndexQueue/RecordMonitorTest.php
+++ b/Tests/Integration/IndexQueue/RecordMonitorTest.php
@@ -254,7 +254,7 @@ class RecordMonitorTest extends IntegrationTest
     public function exceptionIsThrowsWhenRecordWithoutPidIsCreated()
     {
         // we expect that this exception is getting thrown, because a record without pid was updated
-        $this->expectException(NoPidException::class);
+        $this->setExpectedExceptio(NoPidException::class);
 
         // create fake extension database table and TCA
         $this->importDumpFromFixture('fake_extension_table.sql');
Use setExpectedException since PHP < <I> is supported since expectException is for PHP >= <I>