Skip to content

Commit

Permalink
[#393] Drupal 9 readiness: fixing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
arlina-espinoza committed Apr 26, 2020
1 parent 9513bca commit 542c48a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/src/Unit/Command/CreateEdgeRoleCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

/**
Expand Down

0 comments on commit 542c48a

Please sign in to comment.