From: Kunal Mehta Date: Thu, 12 Apr 2018 16:41:20 +0000 (-0700) Subject: Fix KafkaHandlerTest hack to work with PHPUnit 6 X-Git-Tag: 1.31.0-rc.0~100^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=b9e8e9a681bd98f8b3d4280f595b95fb38ef621d Fix KafkaHandlerTest hack to work with PHPUnit 6 Change-Id: I2b2ae31b327976c7c6ba72a49f1d7d068e234928 --- 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' ] ]