diff --git a/core/modules/migrate/tests/src/Kernel/process/CopyFileTest.php b/core/modules/migrate/tests/src/Kernel/process/CopyFileTest.php index ecd1bb1..74d3a47 100644 --- a/core/modules/migrate/tests/src/Kernel/process/CopyFileTest.php +++ b/core/modules/migrate/tests/src/Kernel/process/CopyFileTest.php @@ -4,6 +4,7 @@ use Drupal\Core\StreamWrapper\StreamWrapperInterface; use Drupal\KernelTests\KernelTestBase; +use Drupal\migrate\MigrateException; use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\Plugin\migrate\process\FileCopy; use Drupal\migrate\Row; @@ -135,13 +136,10 @@ public function testSuccessfulMoves() { /** * Test that non-existent files throw an exception. - * - * @expectedException \Drupal\migrate\MigrateException - * - * @expectedExceptionMessage File '/non/existent/file' does not exist */ public function testNonExistentSourceFile() { $source = '/non/existent/file'; + $this->setExpectedException(MigrateException::class, "File '/non/existent/file' does not exist"); $this->doImport($source, 'public://wontmatter.jpg'); }