From e24539a42ddb94f3eee1fafb6cd983687931f764 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 29 Oct 2017 11:09:02 +0100 Subject: fix FTBFS from Koschei, add fix for recent PHPUnit from https://github.com/zendframework/zend-test/pull/55 --- 55.patch | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 55.patch (limited to '55.patch') 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 +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; + } -- cgit