diff options
author | Remi Collet <remi@remirepo.net> | 2017-10-29 11:09:02 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-10-29 11:09:02 +0100 |
commit | e24539a42ddb94f3eee1fafb6cd983687931f764 (patch) | |
tree | 825b31781098305e9258d3afe7a39fdafec985ff /55.patch | |
parent | 0818dc6dcefa0c70b600a25ef9888e0d7c771e70 (diff) |
fix FTBFS from Koschei, add fix for recent PHPUnit from https://github.com/zendframework/zend-test/pull/55
Diffstat (limited to '55.patch')
-rw-r--r-- | 55.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/55.patch b/55.patch new file mode 100644 index 0000000..f5e5c95 --- /dev/null +++ b/55.patch @@ -0,0 +1,38 @@ +From 5818e1abe0155401b066a416e98d3623973004c7 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Sun, 29 Oct 2017 10:53:40 +0100 +Subject: [PATCH] Prefer expectException over deprecated setExpectedException + +--- + src/PHPUnit/Controller/AbstractControllerTestCase.php | 3 ++- + test/ExpectedExceptionTrait.php | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/PHPUnit/Controller/AbstractControllerTestCase.php b/src/PHPUnit/Controller/AbstractControllerTestCase.php +index eda6eed68..b60ad9228 100644 +--- a/src/PHPUnit/Controller/AbstractControllerTestCase.php ++++ b/src/PHPUnit/Controller/AbstractControllerTestCase.php +@@ -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); +diff --git a/test/ExpectedExceptionTrait.php b/test/ExpectedExceptionTrait.php +index 25793dda1..4270ec8b7 100644 +--- a/test/ExpectedExceptionTrait.php ++++ b/test/ExpectedExceptionTrait.php +@@ -16,7 +16,8 @@ + */ + public function expectedException($exceptionClass, $message = '') + { +- if (method_exists($this, 'setExpectedException')) { ++ if (!method_exists($this, 'expectException')) { ++ // For old PHPUnit 4 + $this->setExpectedException($exceptionClass, $message); + return; + } |