diff --git a/tests/src/Unit/Command/CreateEdgeRoleCommandTest.php b/tests/src/Unit/Command/CreateEdgeRoleCommandTest.php index d478a3fb..5e8cb721 100644 --- a/tests/src/Unit/Command/CreateEdgeRoleCommandTest.php +++ b/tests/src/Unit/Command/CreateEdgeRoleCommandTest.php @@ -99,7 +99,7 @@ class CreateEdgeRoleCommandTest extends UnitTestCase { protected function setUp() { if (!class_exists('Drupal\Console\Core\Command\Command')) { $this->markTestSkipped('Skipping because Drupal Console is not installed.'); - } + } parent::setUp(); $this->cliService = $this->prophesize(CliServiceInterface::class); diff --git a/tests/src/Unit/EventSubscriber/EdgeExceptionSubscriberTest.php b/tests/src/Unit/EventSubscriber/EdgeExceptionSubscriberTest.php index 682a084b..8735cd75 100644 --- a/tests/src/Unit/EventSubscriber/EdgeExceptionSubscriberTest.php +++ b/tests/src/Unit/EventSubscriber/EdgeExceptionSubscriberTest.php @@ -125,10 +125,14 @@ protected function setUp() { ->willReturn(new Request()); $this->getResponseForExceptionEvent->getException() ->willReturn($this->exception); - $this->getResponseForExceptionEvent->getThrowable() - ->willReturn($this->exception); $this->getResponseForExceptionEvent->setResponse(Argument::any()) ->willReturn(); + + // Compatibility with Symfony 4.x and up. + if ((new \ReflectionClass(GetResponseForExceptionEvent::class))->hasMethod('getThrowable')) { + $this->getResponseForExceptionEvent->getThrowable() + ->willReturn($this->exception); + } } /**