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: http://git.cyclocoop.org/%24dirpuce/%27%241/%40%20%27entree_login%27%20=%3E%20%27Your%20login%27%2C%20%27entree_login_connexion_1%27%20=%3E%20%27Connection%20login%27%2C%20%27entree_login_connexion_2%27%20=%3E%20%27%28Sometimes%20matches%20your%20FTP%20account%20login%20and%20sometimes%20left%20empty%29%27%2C-%27entree_login_ldap%27%20=%3E%20%27Initial%20LDAP%20login%27%2C%20%27entree_mot_passe%27%20=%3E%20%27Your%20password%27%2C%20%27entree_mot_passe_1%27%20=%3E%20%27Password%27%2C%20%27entree_mot_passe_2%27%20=%3E%20%27%28Sometimes%20matches%20your%20FTP%20access%20password%20and%20sometimes%20left%20empty%29%27%2C%40%40%20-150%2C7%20%20121%2C7%20%40%40%20Do%20not%20submit%20this%20import%20request.%3Cp%3EFor%20more%20information%2C%20please%20see%20%3Ca%20href=?a=commitdiff_plain;h=b9e8e9a681bd98f8b3d4280f595b95fb38ef621d;p=lhc%2Fweb%2Fwiklou.git 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' ] ]