Skip to content

Commit 8568fb5

Browse files
committed
improved exceptions check inside PluginControllerTest
1 parent 48fa350 commit 8568fb5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Tests/PluginController/PluginControllerTest.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ public function testApproveAndDepositPluginReturnsUnsuccessfulResponse()
426426
}
427427

428428
/**
429-
* @expectedException JMS\Payment\CoreBundle\PluginController\Exception\InvalidPaymentInstructionException
429+
* @expectedException \RuntimeException
430430
* @expectedMessage foo
431431
*/
432432
public function testAproveAndDepositPluginThrowsException()
@@ -436,7 +436,7 @@ public function testAproveAndDepositPluginThrowsException()
436436
$payment->getPaymentInstruction()->setState(PaymentInstructionInterface::STATE_VALID);
437437

438438
$plugin = $this->getPlugin();
439-
$exception = new \JMS\Payment\CoreBundle\PluginController\Exception\InvalidPaymentInstructionException('foo');
439+
$exception = new \RuntimeException('foo');
440440
$plugin
441441
->expects($this->once())
442442
->method('approveAndDeposit')
@@ -665,7 +665,7 @@ public function testApprovePluginThrowsTimeoutException()
665665
}
666666

667667
/**
668-
* @expectedException \JMS\Payment\CoreBundle\PluginController\Exception\InvalidPaymentInstructionException
668+
* @expectedException \RuntimeException
669669
*/
670670
public function testApprovePluginThrowsException()
671671
{
@@ -680,7 +680,7 @@ public function testApprovePluginThrowsException()
680680
$plugin
681681
->expects($this->once())
682682
->method('approve')
683-
->will($this->throwException(new \JMS\Payment\CoreBundle\PluginController\Exception\InvalidPaymentInstructionException('some error occurred')))
683+
->will($this->throwException(new \RuntimeException('some error occurred')))
684684
;
685685
$controller->addPlugin($plugin);
686686

@@ -1004,4 +1004,4 @@ protected function createDependentCredit(PluginController $controller, array $ar
10041004

10051005
return $reflection->invokeArgs($controller, $args);
10061006
}
1007-
}
1007+
}

0 commit comments

Comments
 (0)