Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/55'
Browse files Browse the repository at this point in the history
Close #55
  • Loading branch information
Xerkus committed Oct 29, 2017
2 parents 31fa83c + aa6e9ef commit 72dbee0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- Nothing.
- [#55](https://github.com/zendframework/zend-test/pull/55) Fixes compatibility
with PHPUnit 5.7.23 where empty expected exception message no longer means
message is not checked.

## 3.1.0 - 2017-05-01

Expand Down
3 changes: 2 additions & 1 deletion src/PHPUnit/Controller/AbstractControllerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,8 @@ public function assertApplicationException($type, $message = null)
$this->getApplication()->getMvcEvent()->setParam('exception', null);
}

if (method_exists($this, 'setExpectedException')) {
if (! method_exists($this, 'expectException')) {
// For old PHPUnit 4
$this->setExpectedException($type, $message);
} else {
$this->expectException($type);
Expand Down
3 changes: 2 additions & 1 deletion test/ExpectedExceptionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ trait ExpectedExceptionTrait
*/
public function expectedException($exceptionClass, $message = '')
{
if (method_exists($this, 'setExpectedException')) {
if (! method_exists($this, 'expectException')) {
// For old PHPUnit 4
$this->setExpectedException($exceptionClass, $message);
return;
}
Expand Down

0 comments on commit 72dbee0

Please sign in to comment.