diff --git a/core/tests/Drupal/Tests/Core/Scripts/TestSiteInstallCommandTest.php b/core/tests/Drupal/Tests/Core/Scripts/TestSiteInstallCommandTest.php index 15a9c3a3fe..886787d928 100644 --- a/core/tests/Drupal/Tests/Core/Scripts/TestSiteInstallCommandTest.php +++ b/core/tests/Drupal/Tests/Core/Scripts/TestSiteInstallCommandTest.php @@ -40,8 +40,7 @@ public function testSetupFile($expected, $setup_file) { $command = $app->find('install'); $tester = new CommandTester($command); - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage($expected); + $this->setExpectedException(\InvalidArgumentException::class, $expected); $tester->execute([ 'command' => $command->getName(),