From b9e8e9a681bd98f8b3d4280f595b95fb38ef621d Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 12 Apr 2018 09:41:20 -0700 Subject: [PATCH] Fix KafkaHandlerTest hack to work with PHPUnit 6 Change-Id: I2b2ae31b327976c7c6ba72a49f1d7d068e234928 --- .../phpunit/includes/debug/logger/monolog/KafkaHandlerTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/includes/debug/logger/monolog/KafkaHandlerTest.php b/tests/phpunit/includes/debug/logger/monolog/KafkaHandlerTest.php index 14e2e27de8..4c0ca04fef 100644 --- a/tests/phpunit/includes/debug/logger/monolog/KafkaHandlerTest.php +++ b/tests/phpunit/includes/debug/logger/monolog/KafkaHandlerTest.php @@ -158,7 +158,8 @@ class KafkaHandlerTest extends MediaWikiTestCase { ->method( 'send' ) ->will( $this->returnValue( true ) ); // evil hax - TestingAccessWrapper::newFromObject( $mockMethod )->matcher->parametersMatcher = + $matcher = TestingAccessWrapper::newFromObject( $mockMethod )->matcher; + TestingAccessWrapper::newFromObject( $matcher )->parametersMatcher = new \PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters( [ [ $this->anything(), $this->anything(), [ 'words' ] ], [ $this->anything(), $this->anything(), [ 'lines' ] ] -- 2.20.1