Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / process / Tests / ProcessFailedExceptionTest.php
index 5f739158c9b1467f635b24068c3f01020866a1d0..25712af7ded1ac595d8be7b031ea43b8c18ed5bd 100644 (file)
@@ -29,10 +29,12 @@ class ProcessFailedExceptionTest extends TestCase
             ->method('isSuccessful')
             ->will($this->returnValue(true));
 
-        $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}(
-            '\InvalidArgumentException',
-            'Expected a failed process, but the given process was successful.'
-        );
+        if (method_exists($this, 'expectException')) {
+            $this->expectException(\InvalidArgumentException::class);
+            $this->expectExceptionMessage('Expected a failed process, but the given process was successful.');
+        } else {
+            $this->setExpectedException(\InvalidArgumentException::class, 'Expected a failed process, but the given process was successful.');
+        }
 
         new ProcessFailedException($process);
     }